|
|
 |
Re: FN-FORUM: Javascript Challenge
date posted 8th December 2005 12:32
If you're using .NET it will remember your positions if you are doing
things on postback. If you are using JavaScript to change things that
were generated in a .NET page without going back to the server every
time it may be a little confused when the values returned by the page
don't reflect the ones that you sent to the client.
-ben
Craig wrote:
>Referring you to one of the one's I'd done earlier: www.medlifeholidays.com,
>this sets a cookie to remember the dropdown positions on reload. When the
>page loads, it checks to see if the cookie exists. If it is, it sets the
>position of the first dropdown and then independently fires the same
>function that manually changing the first dropdown would have done.
>
>Another one that does the same is www.mytravel.com but that might have been
>modified by now as it's a year since I did that one. They're both a bit of
>a beast if you look at the code but essentially they're the same as your
>example.
>
>However, "if" you're using .NET, it should remember the positions anyway (I
>think).
>
>HTH
>
>Craig
>
>-----Original Message-----
>
>Morning All,
>
>A message was posted a while ago about a script that was needed to
>populate a second drop down box dependant on the option selected in
>the first.
>
>An excellent tutorial for this can be found here:
>
>http://www.plus2net.com/javascript_tutorial/dropdown-list.php
>
>The problem I am facing is that although this works fine, I am using
>it as part of a search box, which when submitted reloads the same page
>and displays the results below. For this reason, I would like the
>options that were selected in both drop downs to still be selected
>when the form is submitted.
>Because of how the code isdone, (and my serious lack of javascript
>knowledge!) I just can't see how this can be done.
>
>For those experienced javascripters out there, if you could have a
>look at the code, and give me some idea, I would really apprciate it!
>
>D
>
>
>
>
>
>
>
|
 |
|