suess0r Posted January 24, 2007 Share Posted January 24, 2007 Hi,I have a city selector to find out what area you're in. 2 drop downs state -> then it populates corresponding cities. once they choose a city it sets the cookie to that city.The problem i'm having is that it doesn't go into effect until after a refresh, I was wondering if A.) How i can add a refresh on my form (because I am POSTing to the same page, code below) or B.) How to get around the refresh in general...Here's my code...[quote]<form action="pg1.php" method="post" enctype="multipart/form-data" name="cf" id="form2"> <div align="right"> <select id='countrySelect' name='country' onchange='populateState()'> </select> <select id='stateSelect' name='state' disabled=true onchange='printcity()' > </select> <script type="text/javascript" src="list.js"></script> <script type="text/javascript">initCountry('CA'); </script> </div> </form><div> <div align="right"> <SCRIPT LANGUAGE="javascript">document.write("Partying in: " +YouWrote+ "."); </SCRIPT> <input name="Submit" type="submit" value="Go!" onclick="putCookie()"/>[/quote]I know it's javascript but i'm not having issues with that, just the refresh problem.. any thoughts? Link to comment https://forums.phpfreaks.com/topic/35556-working-with-refresh-cookies/ Share on other sites More sharing options...
The Little Guy Posted January 24, 2007 Share Posted January 24, 2007 use JavaScript onchange='javascript:history.go(0)'or something of that nature Link to comment https://forums.phpfreaks.com/topic/35556-working-with-refresh-cookies/#findComment-168375 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.