[thelist] Hidden Fields

Walker, Matthew Matthew.Walker at cdc.org.nz
Wed Jul 12 17:15:30 CDT 2000


> So, tell me if I have this right. If you clicked on a link, 
> say "Music", you
> would use a hidden field to hold the value "Music" so that any further
> interaction with the page, e.g. they had to fill out a form, 
> you would know
> it came from the "Music" page. Correct?

Yeah, then when you hit the submit button, the fact that you were entering a
link into the music section would get passed along too even though you
couldn't actually see a field for this on the screen. (This is not
necessarily a good design, just an example.)

To get the value loaded into the hidden field, you would have to use some
server-side script, e.g. (this is ASP)

<input type="hidden" name="CategoryID"
value="<%=Request.QueryString("CategoryID")%>"> 

The "Add your site" links would all be different, they'd pass a value in the
query string (this could be hard-coded, but you would probably have some
kind of dynamic system here):

<a href="Add.asp?CategoryID=34">Add your site</a>




More information about the thelist mailing list