struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Pelly" <gpe...@esri.com>
Subject RE: How can we send parameter's value to javascript function ??
Date Mon, 23 May 2005 15:04:32 GMT
You can't mix  <%= %> and struts form elements (eg, <html:radio>).  Your
best bet is to change the javascript to "whichAuctionType(this)"--send
the input element--then inside your JS function, get the value by doing
a .value on the element passed in.
 

-----Original Message-----
From: minhnguyet [mailto:minhnguyet@ichi-corp.jp] 
Sent: Friday, May 20, 2005 8:47 PM
To: user@struts.apache.org
Subject: How can we send parameter's value to javascript function ??

Hi all,

I want to send  parameter 's value  to  javascript function  .  When I
use  <html : radio as  follow  

<html:radio property="auctionTypeId" value="<%=(String)rId%>"
onclick='javascript:whichAuctionType(<%=(String)rId%>);'/>   , 

 the value is not send  and  this is a result in IE   

<input type="radio" name="auctionTypeId" value="1"
onclick="javascript:whichAuctionType(<%=(String)rId%>);">        

But when  use <input type="radio " as follow 

 <input type="radio" name="auctionTypeId" value="<%= (String)rId%>"
onclick='javascript:whichAuctionType(<%=(String)rId%>);'/> 

everything is work right   :      <input type="radio"
name="auctionTypeId" value="1"
onclick='javascript:whichAuctionType(1);'/>

. I don't see what is different in html  code .  So , how can we
directly send parameter value to javascript using <html:radio/> tag ?

Thanks in advance !



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message