Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: restore the data in combo box on using back button

by themage (Friar)
on Dec 12, 2006 at 10:09 UTC ( #589249=note: print w/ replies, xml ) Need Help??


in reply to restore the data in combo box on using back button

Hi gowthamtr,

That will depende on how the specific browser you're using implements the back funcionality.

Anyway, if you use javascript to create or change options in forms, you should not use the back button, but a button implemented by you, that will reinitiate the selects to the last selected values.

You can't relay on any default browser behaviour as diferent browsers and even diferent versions of the same browser, or even diferent plugins on the same version of the same browser will work in diferent ways.

TheMage
Talking Web


Comment on Re: restore the data in combo box on using back button
Re: restore the data in combo box on using back button
by gowthamtr (Sexton) on Dec 12, 2006 at 10:13 UTC
    How will u create a button that will reinitiate the selects to the last selected values?

    The values in combo 2 will be loaded only when some event occurs.
      Hi gowthamtr,

      That is an information I can give you without some more information on what you are doing.

      But I presume you could send to the previous page some information on the selected values, and then pre-load the selects and pre-select the correct values when generating the page.

      That's what I've done in the past, in similar events.

      An alternative is to have a javascript that calls the same methods that were called as eventHandlers.

      TheMage
      Talking Web
      You could just forget about having a back button displayed to go back, and just have the CGI script take you back to the submission page. The CGI script would pass the initial box 2 and box 3 values as parameters to the submission page. You could then use JavaScript to re-set the initial box 2 and box 3 values ...

      There is no reason why you cannot pass around a few cookies either.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://589249]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2014-09-17 11:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (72 votes), past polls