Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing the value to the javascript

 
kiran par par
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 %<')"<

</html:form<

<SCRIPT LANGUAGE="JavaScript"<
function launchWFClient(value){

alert(value);
}
</SCRIPT<

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
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic