Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

submission of FORM by clicking on image

 
sunil kumre
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the form contains the address of servlet to which i've to pass
control.
--------------------
<form name="Adv" action="../../AdvertiserClickThrough" method=get>
<input type=hidden name="AdvClickThrough">
</form>
here is the script
-----------------------
<script language=javascript><!--
function GotoURL(URL){
document.Adv.submit(); (***)
}
//-->
</script>

here is the href inside of which i've an image...by clicking on this image i want the form "Avd" should get submitted passing control to the respective servlet.
<A HREF="#" onClick="GotoURL('www.mcdonalds.com');"><IMG NAME="button2" SRC="../../../Cyberdrawer/images/b_goadsite_off.gif" WIDTH="91" HEIGHT="27" ALT="Go to Advertiser´┐Żs site." BORDER="0"></A>
but when i click on image it is not firing the servlet request
can anyone help?
thanks in advance.
 
hemanth kumar
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
ur a tag should be
<a href="javascript:GotoURL(......."><img src......
Hope the abv helps
hemanth
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic