Call a form within an image map?

I have a graphic.  I want users to be able to click on various image maps on the graphic which call up a form.

I want to use standard HTML, no java (unless absolutely necessary) -- to make it as compatible with as many browsers as possible.

Thanks!
LVL 9
Rowby GorenAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cookmysterCommented:
So, when you click on the images map, it is going to call the page which has the form???
0
Rowby GorenAuthor Commented:
No, I want it the button to contain all of the form information that is usually found in a submit button.  I'm posting to a cgi script. (it's for a shopping cart I'm creating.)

I guess the scenereo is somewhat like the following:

People see one big image of an *assortment* of toys.  They click on the toy they want to purchase, and they area taken to the checkout section of a shopping cart.

To repeat: The image map calls up the cgi program (using the standard form peramaters) and are taken to the checkout.  

I assume this can be done.  Right?  Again, I don't want to take them to another page where they then push the form button.  

Thanks!

Rowby
0
garrethgCommented:
As long as you're not passing sensitive information how about just passing the parameters as an URL encoded string via the HREF? That's all a form with the get method does anyway.

e.g.
<AREA HREF="
http://www.myDomain.com/myCGI?param1=toy1¶m2=price">
0
banjonesCommented:
To avoid the query string, another way would be to have the forms on the page with hidden fields and then submit the relevant form with javascript.
Something like this:

<script language=JavaScript>
 function buyToy (formName) {
   document[formName].submit();
 }
</script>


<form name=teddy method=post>
 <input type=hidden name=toy value=bigTed>
</form>


<area href="javascript:goForm('teddy')">
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
banjonesCommented:
The javascript function in the <area> tab should obviously been 'buyToy()'...

Doh!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.