Closed Thread Icon

Preserved Topic: Interesting Bug/Feature (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=20934" title="Pages that link to Preserved Topic: Interesting Bug/Feature (Page 1 of 1)" rel="nofollow" >Preserved Topic: Interesting Bug/Feature <span class="small">(Page 1 of 1)</span>\

 
jiblet
Paranoid (IV) Inmate

From: Minneapolis, MN, USA
Insane since: May 2000

posted posted 06-04-2001 23:11

Some time ago I needed help on how to have multiple submit buttons that passed different values in a single form. Well, with Slime's help I came up with a simple javascript solution to my problem, basically use <input> elements of type button rather than submit, and the onclick attribute can set a hidden element to whatever value you want then use the submit() method.

As it turns out (at least in Mac IE 5), the changes that javascript makes to the source are still present when you return to the page via the back button, yet don't appear in the source code when you view it. It took me over an hour of banging my head on the desk to realize what was going on here.

The solution it seems, is to never rely on default values existing when a page is loaded, instead each button must explicitly set all values that it assumes.

-jiblet

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 06-05-2001 00:21

I've seen sites that do some interesting work using onfocus() and onblur() combined with JS cookies to store form info for situations where you leave forms and comeback to them.

It's an elegant trick.


Walking the Earth like Kane

« BackwardsOnwards »

Show Forum Drop Down Menu