The moose likes JSP and the fly likes passing the value to the javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "passing the value to the javascript" Watch "passing the value to the javascript" New topic

passing the value to the javascript

kiran par par

Joined: Oct 04, 2004
Posts: 4
Hi all I was trying to do something like this,

< html:form action="/test" <
String passedValue = "Test Value";
<html:button property="page" value="click here" on click="showValue('<%=passedValue %<')"<


function launchWFClient(value){


I am getting the value displayed as <%=passedValue %<

Is there way to pass the value that is defined in the scriptlet to the javascript, that is , is there a way to display "Test Value"
or am i getting the basics wrong?

And how do I get awa with < symbol I was not able to post with that in my content
thanks for the help in advance.
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
1) yes you are getting the basics wrong.

Have a look at this thread

2) whenever posting some code snippets, use UBB code.
[ October 21, 2004: Message edited by: adeel ansari ]
I agree. Here's the link:
subject: passing the value to the javascript
It's not a secret anymore!