This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes submission of FORM by clicking on image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "submission of FORM by clicking on image" Watch "submission of FORM by clicking on image" New topic

submission of FORM by clicking on image

sunil kumre
Ranch Hand

Joined: Dec 23, 2000
Posts: 64
the form contains the address of servlet to which i've to pass
<form name="Adv" action="../../AdvertiserClickThrough" method=get>
<input type=hidden name="AdvClickThrough">
here is the script
<script language=javascript><!--
function GotoURL(URL){
document.Adv.submit(); (***)

here is the href inside of which i've an clicking on this image i want the form "Avd" should get submitted passing control to the respective servlet.
<A HREF="#" onClick="GotoURL('');"><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

Joined: Mar 15, 2001
Posts: 55
ur a tag should be
<a href="javascript:GotoURL(......."><img src......
Hope the abv helps
I agree. Here's the link:
subject: submission of FORM by clicking on image
jQuery in Action, 3rd edition