View Full Version : Reloading a script.
10-17-2005, 04:06 PM
I am making a web site for the company I work for. I am familiar with HTML but i have to get my Javascrpits off the web. Anyway I decided to use a script with two combo boxes that link, so if you pick a certain category on one the list for the other changes picking one from that list brings you to the site attached. My problem is such that if I link to a site through these boxes and hit the back button the menus are empty and I need to hit refresh or choose a diffrent category from the first box. My question is does anyone know of a way to reload the script when the Internet Explorer back button is pushed. Or does anyone know of a nice script that will serve the perpose pf breaking down categoies that does not have this problem.
Sorry for the trouble and thank you in advance for any and all help,
10-17-2005, 06:07 PM
when the source page loads append some url variables, or better yet, when a option is selected reload the page with the option listed in the url
this will allow you to remember the status of the previous page when returning to it. then you select your options accordingly.
10-17-2005, 06:36 PM
My guess was to place that at the end of the url link in the combo box but that did not work. Did i do something wrong or should i be trying something else. Thank you for your reply rlemon.
10-17-2005, 06:40 PM
no, when you select the option from the combo box reload the current document with the option in the url. example:
if the page is "www.mydomain.com/page.php" and you have three drop-down lists titled list1, list2, and list3.
When an option in list1 is selected reload page.php with page.php?list1=option
in your code read the url variables and select your options accordingly.
Then when the new page loads, if the user hits 'back' they will be taken to page.php?list1=option and your code will read list1=option and set the selectedIndex to the applicable option. get it?
or use session variables? if you can use php i can show you how this is done
10-17-2005, 07:01 PM
Ill play around with it. Ill be back if i can get it to work. Thank you very much for your time.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.