struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From The_Developer <>
Subject Re: Scriplets not working in <html:xyz> tags
Date Tue, 22 Jan 2008 05:32:34 GMT

Thanks Laurie,

I tried the solution you gave but to no avail. Here's what i did,

	int i=0;

                <html:select property="ewPrdProduct" onchange="update('<%=i
%>')" name="ProductPricelistForm"              styleClass="inputbox">
	                    	<html:options collection="beansList" property="value"
labelProperty="label" />	 

and the resulting output was,

<select name="ewPrdProduct" onchange="update('<%=i %>')" class="inputbox">

I tried this before also and got the same output which is why I am confused.


The_Developer wrote:
> Hi,
> I've been trying to use scriptlets and/or <bean:write> tags inside
> <html:select onchange=""> and <html:button onclick=""> tags. However it
> seems that in either case the expression is not evaluated at runtime. The
> end result is something like this
> <html:select  onchange="javascript:update('<bean:write
> name='productId'/>)">abc</html:select> and
> <html:button  onclick="javascript:update('<bean:write
> name='productId'/>)"/>
> when the I intended the output to be something like
> <html:select  onchange="javascript:update('5)">abc</html:select> and
> <html:button  onclick="javascript:update('5')"/>
> Does anyone know why this is happening or am I making a mistake?
> Many Thanks

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message