user4fun Posted August 7, 2007 Share Posted August 7, 2007 I need to check the syntax of the document.cookie statment also do the url part after the ( //) function get_domain() { var domain=prompt("Please enter your website address. Your entry is case sensitive","www.yoursite.com") if (domain!=null && domain!="") { document.cookie = 'website=+domain+'; // i need the current window to change the url to start_uc.php } else { alert("Your domain value was left empty.Please try again!") }} </script> Just a thoughts, when the users browsers asks the user if he/she would like to temporarily accept scripted windows, my alert box automatically comes up, can i get arround that.? Link to comment Share on other sites More sharing options...
PrateekSaxena Posted August 7, 2007 Share Posted August 7, 2007 u want to get the domain automatically? Link to comment Share on other sites More sharing options...
justsomeguy Posted August 7, 2007 Share Posted August 7, 2007 Change this:document.cookie = 'website=+domain+';to this:document.cookie = 'website='+domain; Link to comment Share on other sites More sharing options...
user4fun Posted August 8, 2007 Author Share Posted August 8, 2007 i am not sure what het the domain automatically mean, just some guy, thank you,how can i redirest the user to the new page start_uc.php Link to comment Share on other sites More sharing options...
justsomeguy Posted August 8, 2007 Share Posted August 8, 2007 If you want to redirect using Javascript you can set window.location to whatever you want. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.