# Image Map and Form Submit



## drdrew1469 (Nov 30, 2000)

I inherited some code that I'd like to use but an unsure why it was done this way, maybe you can explain. I have an image map of the US, poly's by state lines. Sits in a form for some reason to submit to the same page that the href passes via javascript. Example:

then the form:

and the image map href:

It seems to me that there is really no "submit" so to speak, so how would I, or what would I change to be able to grab "PA" like it was actually "submitted"? So I could use:

<%=Request.form("RequestState")%>

because it's not working as it is, lol.

thanks,

drew


----------



## Rockn (Jul 29, 2001)

The thing is you are working with a server side and a client side language. You really don't need either if you hard code the URL and state into the HREF for the imagemap selection. Not sure what you mean by submitted gecause you aren't using a form.


----------



## drdrew1469 (Nov 30, 2000)

Thanks, Rockn. It was about 11:00 last night when I figured this all out. The following code works great. Basically, the form action is the url and an onmouseover changes a hidden form value to the state before the form is submitted. Then I can retrieve and use the value to filter my csv data as it's being binded. Pretty cool 

Thanks,

drew

form:

image map:
<AREA SHAPE="poly" ALT="Pennsylvania" COORDS="numbers,go,here" HREF="javascript:document.State.submit();" onMouseover="document.forms['State'].RequestState.value='PA'; return false;"


----------



## covert215 (Apr 22, 2006)

Quick FYI- XHTML uses all lower case attributes and tags


----------

