Hey Colin, Thanks for replying. I guess this has sidelined from php a bit now... so have added a OT in the subject line. Anyway, this is how I get the values from a select or a text box: var selectBox = document.forms[0].lang; user_input = selectBox.options[selectBox.selectedIndex].value; var textBox = document.forms[0].sec_name; user_section = textBox.value; kindly show me how to get the value from a javascript prompt box, the force is with me but the JS DOM is from the dark side :D Cheers! R Colin Guthrie <gmane@xxxxxxxxxxxxxx> wrote: Ryan A wrote: > Quick question (and hopefully a simple one) > > I have a link on a page, when the client clicks that link it should > show them a JS prompt and ask for their name (so far I have done > this) > > When they write their name, I want that data to be sent to my php > script via AJAX (yes?) so the page does not reload or anything.... > (actually, how can i reload the page to reflect the change?) > > I have googled but I see whole ajax classes and what not, I dont know > if I am using the correct keywords or what... you would happen to > have a working piece of code that you could share with me.. would > you? You don't need any Ajax here. All you need is to take the value entered into the js box and use normal javascript commands to store this value in a cookie. This cookie will be sent automatically to your PHP script the next time a user requests a page from your server. If you want to provide immediate visual feedback, you can use standard DOM methods to insert the users name into the page where you want. No need for any fancy Web 2.0 nonsense here..... move along, nothing to see... ;) Disclaimer: this may not work for your needs but I cannot see why not from the info given :) Col. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ------ - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) --------------------------------- Everyone is raving about the all-new Yahoo! Mail beta.