Hi Anuradha,


I think this will work:



onclick="return validateDelete('<bean:write name="abc"/>')"

where "abc" is the java variable that you put in request/session.



With best regards,

Anjishnu.



-----Original Message-----
From: Anuradha S.Athreya [mailto:[EMAIL PROTECTED]
Sent: Monday, August 29, 2005 2:26 PM
To: [EMAIL PROTECTED] Apache. Org
Subject: Passing variable to javascript function





I had posted this problem a few days back, but I couldn't find a
solution to

this.

So I'm posting this again, since I need to implemen this urgently.



> <script>

> function validateDelete()

> {

>          return confirm("Delete Data");    

> }

> </script>      

>

>

>          <html:link action="deleteData" name="deleteDataParams"
scope="page"

> onclick="return validateDelete()" >

>                                              Delete Data

>                                  </html:link>

>

>          To the validateDelete() Javascript function, I want to pass a
java

> variable. How do I do it?

>          Once I pass the variable, my javascript function has to be :

>

>                      <script>

> function validateDelete(data)

> {

>          return confirm("Delete Data"+data);        

> }

> </script>      



**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not to copy, disclose, or distribute this e-mail or its contents to any other 
person and any such actions are unlawful. This e-mail may contain viruses. 
Infosys has taken every reasonable precaution to minimize this risk, but is not 
liable for any damage you may sustain as a result of any virus in this e-mail. 
You should carry out your own virus checks before opening the e-mail or 
attachment. Infosys reserves the right to monitor and review the content of all 
messages sent to or from this e-mail address. Messages sent to or from this 
e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

Reply via email to