struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arnaud Heritier <>
Subject RE: <html:image> and javascript incompatibility ???
Date Thu, 30 Aug 2001 12:08:13 GMT
Thanx Satyen for this information.

But if I use a

<a href src="???" onClick="javascript:validateAndSubmit(????,'....')">
<img src="...">

What should I use as src because it will go on it when the answer is 
negative !!! I can put <%=request.getResquestURI()%> but I don't find this 
very beautiful.
And how can I access in JavaScript to the form object which is the parent 
of the <a href="...>???? I don't find how to do.

If someone as informations which can help me, I will be very graceful !!!!!


-----Message d'origine-----
De: []
Date:	jeudi 30 aout 2001 12:55
Objet:	RE: <html:image> and javascript incompatibility ???

When you use a image, instead of using its onclick event , put an href link
on the image and it will work fine.... this is html constraint!!!!

-----Original Message-----
From: Arnaud Heritier []
Sent: Thursday, August 30, 2001 11:46 AM
To: 'struts users mailing list'
Subject: RE: <html:image> and javascript incompatibility ???

Sorry, but as you should seen it, I reversed the two JSP codes :-)


-----Message d'origine-----
De:	Arnaud Heritier []
Date:	jeudi 30 aout 2001 12:40
A:	'struts users mailing list'
Objet:	<html:image> and javascript incompatibility ???

Hello Guys!!

I've a little problem concerning the use of the html taglib and the
javascript code.
I'm not sure that it concerns directly the html taglib or the html language

The problem is that I would like to propose to the user to confirm an 
before to do it.
I had written this javascript function :

function validateAndSubmit(theform,warningtext) {
    if (window.confirm(warningtext)) {
	return true
    } else {
	alert('not ok')
	return false
and this JSP code :

<html:form action="">
certain de vouloir supprimer cette requete de recherche de lots?')"/>

and it's WORK.
When I don't confirm nothing happends, whereas when I confirm the action

So, now I would like to replace this button by an image.
I keep the same javascript code
and I replace the JSP by this one :

<html:form action="">
certain de vouloir supprimer cette requete de recherche de lots?')">

Now in both cases (if I confirm or not), the action is called, but I get 
good alert message from the javascript !!!!!!

I don't understand what it happends !!!!!

Is anyone have an idea concerning my problem.

Thanx all


PS : my configuration is :
OS : NT 4 SP6
WebApp Server : Tomcat 3.2.3
Browser : IE5.5
and Struts 1.0

Ingenieur d'etudes
SOPRA. Group
EAI Consulting
Tel : +33-1-49-00-58-12
Fax : 04 50 33 30 78
Email :

The information in this Internet email is confidential and may be
legally privileged. It is intended solely for the addressee. Access
to this Internet email by anyone else is unauthorised.

If you are not the intended recipient, any disclosure, copying, 
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this Internet email are subject to the terms and conditions
expressed in any applicable governing ING Barings' terms of business or
client engagement letter.

Visit us at


View raw message