[thelist] JS: Snippet to grab GET/POST value?

Frank lists at frankmarion.com
Mon Aug 18 16:54:13 CDT 2003


At 02:05 PM 2003-08-18 -0700, you wrote:
>are you trying to keep users from reloading a page that results in a form
>post?

>perhaps if you explain what you're actually trying to accomplish you'll get
>a more helpful answer.

The answer was a pretty helpful answer. Thank you. I'll fly this past you 
just to get your ideas though.

I have an administrative page with lots of form information broken up into 
logical divs (clients info, address, contact information, pop information 
and so forth).  [Visual description best seen in mono-spaced font.]

At the top of the page I have a "function bar" where clicking on a name 
(ie: Notes) changes the class of a div from hidden to visible.  All divs 
are "hidden" by default, and display only when it's name on a "function 
bar" is clicked.

"Function bar"
| Client Info | CONTACT | Notes | Account Details |
|-------------------------------------------------|


|-------------------------------------------------|
| Client Info (hidden/invisible)                  |
|-------------------------------------------------|

|-------------------------------------------------|
| Contact (on/visible)                            |
|                                                 |
|                                                 |
|      Contact related form-part here             |
|                                                 |
|                                                 |
|                                                 |
|                                                 |
|                                                 |
|                                                 |
|-------------------------------------------------|

|-------------------------------------------------|
| Notes (hidden/invisible)                        |
|-------------------------------------------------|

|-------------------------------------------------|
| Account Details (hidden/invisible)              |
|-------------------------------------------------|

Problem is when I submit a form and it reloads, all the divs are hidden by 
default, and thus it's a disconnect for the user. I want to append the 
values of the visible divs to a url with the values of "on" or "off" so 
that on reload, the divs that were open show as such.

I might have something like this

?notes=on&contact_info=on

so that on reload these divs "un hide" themselves, as the user had before 
form  submission.

Kind of long-winded. Sorry.


--
Frank Marion     lists at frankmarion.com      Keep the signal high.  



More information about the thelist mailing list