Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Oct 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Reloading a script.

    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,
    Chris W.

  • #2
    Senior Coder
    Join Date
    Apr 2005
    Posts
    1,051
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

    i.e
    mydomain.com?opt1=0&opt2=25&opt3=100

    this will allow you to remember the status of the previous page when returning to it. then you select your options accordingly.
    public string ConjunctionJunction(string words, string phrases, string clauses)
    {
    return (String)(words + phrases + clauses);
    }
    <--- Was I Helpfull? Let me know ---<

  • #3
    New to the CF scene
    Join Date
    Oct 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #4
    Senior Coder
    Join Date
    Apr 2005
    Posts
    1,051
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?

    Edit: or use session variables? if you can use php i can show you how this is done
    public string ConjunctionJunction(string words, string phrases, string clauses)
    {
    return (String)(words + phrases + clauses);
    }
    <--- Was I Helpfull? Let me know ---<

  • #5
    New to the CF scene
    Join Date
    Oct 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ill play around with it. Ill be back if i can get it to work. Thank you very much for your time.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •