todayme Posted March 5, 2007 Share Posted March 5, 2007 I have three text boxes, first one is the dropdownindusty.php below, the next one is the static html you see down further, when the second text box changes the java scipt grabs both values and stores them in a variable. At the end of that java script I am going to ask it to call another function, which will be a php script which will grab the two variables and do what it needs before populating the third text box. My question is, how do with PHP grab the values of those two variables? Can this be done? <?php include("dropdownindustry.php"); ?> </td> </tr> <tr> <td width="27%" height="22"><b>State:</b></td> <td width="82%" height="22"><select size="1" name="State" onchange="captureselection()"> <option value="Brisbane">Brisbane</option> <option value="Queensland">Queensland</option> <option value="New_South_Whales">New South Whales</option> <option value="Victoria">Victoria</option> <option value="South_Australia">South Australia</option> <option value="Western_Australia">Western Australia</option> </select></tr> <SCRIPT LANGUAGE="javascript"> function captureselection() { var locatestate = window.location var locateindustry = window.location document.Leads.State.value = locatestate document.Leads.Industry.value = locateindustry var cool_state = document.Leads.State.value var cool_industry = document.Leads.Industry.value document.write(cool_state); document.write(cool_industry); } </SCRIPT> Quote Link to comment https://forums.phpfreaks.com/topic/41206-using-php-to-grab-variables-from-memory-that-javascript-has-put-in-memory/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.