Panchasheel,

I've tried it. It doesn't work. It takes '<%=choice.toString()%>' as a whole
string, it does not replace it by the letter I want.

Actually, if you write this, and try to hover over the link, you will see:
        'javascript:setHiddenletter('<%choice.toString()%>')' 
INSTEAD OF 
        'javascript:setHiddenletter('D')' or
'javascript:setHiddenletter('A')' or something.

I am not sure how I can trick struts to capture the dynamic value, not
hardcode it.

Anyone can help?

Mona

-----Original Message-----
From: Gandle, Panchasheel [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 12:02 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


This should work
<html:link  href="javascript:setHiddenLetter('<%=choice.toString()%>');


        <logic:iterate name="addressListFormBean" id="choice"
property="letterOptions">
        <html:link
href="javascript:setHiddenLetter('<%=choice.toString()%>');
document.forms[0].submit(); ">
                <bean:write name="choice" property="labelStr"/>
        </html:link>
       </logic:iterate>

Panchasheel



-----Original Message-----
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 11:50 AM
To: 'Struts Users Mailing List'
Subject: taglibs - nonstatic javascript value




yes, it worked.

I have one problem, though: passing dynamic value to the function I call in
javascript.

This is what I have:
        <logic:iterate name="addressListFormBean" id="choice"
property="letterOptions">
        <html:link
href="javascript:setHiddenLetter('<%=choice.toString()%>');
document.forms[0].submit(); ">
                <bean:write name="choice" property="labelStr"/>
        </html:link>
       </logic:iterate>

I would like to replace that 'D' with something like <%=choice%>, for the
user to be able to select the letter (there are letter A through Z, and
'letter' is a hidden field).

How can I do that?

Mona 

-----Original Message-----
From: Lynn Guy [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 4:35 PM
To: Struts Users Mailing List
Subject: RE: first time action


put them in an html form tag
then in your link do something like
onclick=this.submit()
<script>
function doInsert() {
         document.forms[0].submit();
}
</script>

  <html:form action="assetWorksheet.do" method="post"
>
    <a href="javascript:doInsert()">        
      <html:img srcKey="image.button.createIncome"</a>
   </html:form>

I think the name property for the html:form tag is no
longer valid so forms[0] refers to the first form on
my page.

In your case you can probably use the html:link tag
and put the javascript call in the onclick property.

hth


****************************************************************************
*
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized. 

If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this email are subject to the terms and conditions expressed in
the governing KPMG client engagement letter.         
****************************************************************************
*


---------------------------------------------------------------------
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]


*****************************************************************************
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized. 

If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this email are subject to the terms and conditions expressed in
the governing KPMG client engagement letter.         
*****************************************************************************


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

Reply via email to