tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zabel, Ian" <>
Subject [OFF TOPIC] RE: To capture the CLICK event of SUBMIT button
Date Tue, 08 Oct 2002 14:48:07 GMT
It would certainly be easier to answer this question with a sample of your
code, but I will run through some basic javascript techniques you may be
able to use.

You can make an HREF submit a form:

function doSubmit() {
	document.forms[0].hiddenField.value = 'test!'
	return true
<form action="nextpage.jsp">
<a href="javascript:doSubmit()">Click here to set value and submit form</a>

<input type="hidden" name="hiddenField">

When you click on the link on this snippet of code, it will call doSubmit()
which sets the value of the hidden field, and then submits the form to
nextpage.jsp. Hopefully this will give you some ideas.

Some good resources:


-----Original Message-----
From: Nagpal, Vikas []
Sent: Tuesday, October 08, 2002 10:30 AM
To: ''
Subject: To capture the CLICK event of SUBMIT button

Hello Everybody,

I have been trying to accomplish two jobs simultaneously. First on the CLICK
of my ANCHOR tag I want to assign some value to the HIDDEN input tag and
simultaneously carry this value to the page linked to HREF element of this

Till this point of time its a two CLICK process(Using JAVASCRIPT FUNCTION):

1) I CLICK on my HREF element and it assigns some value to the HIDDEN input

2) Then I CLICK on the SUBMIT button and it carries the value assigned to
the HIDDEN input tag to the page linked to the HREF element of the ANCHOR

Can i make this a single CLICK process by capturing CLICK event of the
SUBMIT button on the onClick event of my ANCHOR tag. Can I make this single
step process.

Thanks in advance,
With regards,
Vikas nagpal.


To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message