This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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
Similar Threads
Javascript new window is not opening from a jsp page
Problem in using javascript in spring web mvc system:
2 Player Connect 4 game
How can i trace this..
GET Method Working But POST is not