PDA

View Full Version : how to assign a hotspot as submit button to save data in database??


wanye
04-01-2003, 02:01 PM
hi all, i need help on assigning an image hotspot as a submit button to save data in the database. how do i do that? thx.

Mhtml
04-01-2003, 02:35 PM
<map name="myMap">
<area shape="rect" coords="x1,y1,x2,y2" onClick="myForm.submit()"/>
</map>

Also as a note, this should have been in the Html & Css (http://www.codingforums.com/forumdisplay.php?s=&forumid=13) forum!

Mhtml
04-01-2003, 02:37 PM
Oops, forgot: <img src="blah.gif" usemap="myMap"/>

raf
04-01-2003, 03:15 PM
Mhtml,

just beeing curious and you beeing so smart and all and me never used this:
"What variable and value are then posted with the form?"

I presume wanye also needs to know how to grab the value and store it in the db (not that i underestimate him:D) So let us know if you also need info on this.

whammy
04-02-2003, 12:10 AM
That should work ok, but I would usually use

onClick="javascript:document.forms[0].submit()"

or something to that effect, since just referencing the form name from an image doesn't work cross browser (if at all) from what I've seen...