File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
Author

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
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

Joined: Mar 15, 2001
Posts: 55
hi
ur a tag should be
<a href="javascript:GotoURL(......."><img src......
Hope the abv helps
hemanth
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: submission of FORM by clicking on image
 
Similar Threads
Javascript new window is not opening from a jsp page
2 Player Connect 4 game
How can i trace this..
GET Method Working But POST is not
Problem in using javascript in spring web mvc system: