Hi 

If I remembrer correctly

1) Use: <html:text property="foo" value='<%= "I love sparrows!!!" %>' />  
2) For the original example do it this way:
         <html:text name="book" property="title" indexed="true"  
                onblur='<%="doThis(" + index.intValue() + ")" %>'/>
                When using <%= %> you need to put everything in it.

Hope it help .. hope I'm right :-)

Ciao
/David



-----Message d'origine-----
De : Mark Lowe [mailto:[EMAIL PROTECTED] 
Envoyé : May 28, 2004 05:54
À : Struts Users Mailing List
Objet : Re: how to send the 'index' to javascript function

I've just done the following in a struts html:text tag

<html:text property="foo" value="<%= "I love sparrows!!!" %>" />

This is using the 1.1 release version of struts.. On TC5 and with el  
enabled on the page to boot.

The page rendered as I predicted.

Perhaps just a freak accident, and as I said before I wouldn't like to  
go up against such a confident statement, but I fear I'm right.

On 28 May 2004, at 11:46, Janarthan Sathiamurthy wrote:

> Hey Mark,
> I am sure you r wrong.
> If u check the struts-html.tld for 'text' u find -
> <attribute>
>    <name>onblur</name>
>    <required>false</required>
>     <rtexprvalue>true</rtexprvalue>
> </attribute>
>
> This means we can specify the onblur value as a run time expression.
>
> Regards,
> Janarthan S
>
> -----Original Message-----
> From: Mark Lowe [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 28, 2004 3:07 PM
> To: Struts Users Mailing List
> Subject: Re: how to send the 'index' to javascript function
>
>
>> Scirptlets will not work within a html struts tag. If you want to use
>> scriplets use a normal html tag instead.
>
> Thats the first I ever heard that.. Thanks for the tip Brati.
>
> So you're saying that
>
> <html:text property="foo" value="<%= "I love sparrows" %>" />
>
> wouldn't render (assuming the form and with the property foo is
> configured)
> to
> <input type="text" name="foo" value="I love sparrows">
>
> Despite my gratitude for your insights into this, may I be as bold as
> to ask "Are you absolutely sure?" ,because I'd say perhaps with less
> degree of certainty than your unambiguous statement communicates, that
> "scriptlets work in html struts tags" which I'd hesitate in putting
> forward in the face of such conviction.
>
>
> On 28 May 2004, at 11:25, [EMAIL PROTECTED] wrote:
>
>>
>> Scirptlets will not work within a html struts tag. If you want to use
>> scriplets use a normal html tag instead.
>>
>>  Brati Sankar Ghosh
>>  Tata Consultancy Services
>>  Mailto: [EMAIL PROTECTED]
>>  Website: http://www.tcs.com
>>
>>
>>
>>
>> Mark Lowe <[EMAIL PROTECTED]>
>>
>> 05/28/2004 02:47 PM
>>
>>
>> Please respond to
>>  "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>
>>
>>
>> To
>> "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>
>> cc
>>
>> Subject
>> Re: how to send the 'index' to javascript function
>>
>>
>>
>>
>>
>>
>>
>> What happens if you try this in your page?
>>
>>  <%= "JSP Works!!!" %>
>>
>>
>>  On 28 May 2004, at 11:05, [EMAIL PROTECTED] wrote:
>>
>>>
>>> Hi Janarthanan,
>>>
>>>         I tried that, Im getting '<%= index.intValue()%>' in
>> doThis()  
>>> and not the value.
>>>
>>> Regards
>>>  Subramaniam
>>>
>>>
>>>
>>>
>>>
>>> "Janarthan Sathiamurthy" <[EMAIL PROTECTED]>
>>>
>>> 05/28/2004 02:12 PM
>>>
>>>
>>> Please respond to
>>>  "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>>
>>>
>>>
>>> To
>>> "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>>
>>> cc
>>>
>>> Subject
>>> RE: how to send the 'index' to javascript function
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> try this -
>>>  <html:text name="book" property="title" indexed="true"  
>>> onblur="doThis('<%= index.intValue() %>')"/>
>>>
>>>  Regards,
>>>  Janarthan S
>>>
>>>  -----Original Message-----
>>>  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>>>  Sent: Friday, May 28, 2004 9:55 AM
>>>  To: Struts Users Mailing List
>>>  Subject: how to send the 'index' to javascript function
>>>
>>>
>>>
>>>  Hi,
>>>         This is my jsp.
>>>         <logic:iterate name="books" id="book" indexId="index">
>>>                 <html:text name="book" property="title"
>> indexed="true"  
>>> onblur="doThis()"/>
>>>         </logic:iterate>
>>>         
>>>         how to send the 'index' as input to 'doThis()' [javascript  
>>> Function]
>>>
>>>  Thanks
>>>  Subramaniam
>>>
>>>
>>>
>>> ForwardSourceID:NT0000D4D2    
>>>
>> <InterScan_Disclaimer.txt>-------------------------------------------- 
>> -
>>> ------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> ForwardSourceID:NT0000A1F6    
>> <InterScan_Disclaimer.txt>-------------------------------------------- 
>> -
>> ------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to