By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,717 Members | 1,233 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,717 IT Pros & Developers. It's quick & easy.

submit form when mouse over

P: 10
I have a page with image, image has some image map, I want to submit form when user mouseover that image map, my code is like this:

Expand|Select|Wrap|Line Numbers
  2. <img src="Images/floor4.jpg"usemap="#planetmap" id="IMG1">
  3. <map id="planetmap" name="planetmap"> 
  5. <area id=f4 shape="circle" coords="65, 93, 11" alt="CF4588" onmouseover=overf4()>
And I write sub overf4() in vb script

Expand|Select|Wrap|Line Numbers
  1.  sub overf4() 
  2. document.frmSelect.submit()
  3. end sub
when mouse over form submit several times until mouse in on the point I want to sumbit iust one time
can u help me?
Dec 13 '05 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 16,027
The area tag needs to be enclosed within map tags (and no need to use VB when JavaScript is fine).
Expand|Select|Wrap|Line Numbers
  2. <img src="Images/floor4.jpg" usemap="#planetmap" id="IMG1">
  3. <map id="planetmap" name="planetmap"> 
  4. <area id="f4" shape="circle" coords="65, 93, 11" alt="CF4588" onmouseover="overf4()">
  5. </map>
Expand|Select|Wrap|Line Numbers
  1. function overf4() {
  2.     document.forms["frmSelect"].submit();
  3. }
Apr 18 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.