You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Zmitko, Jan" <Ja...@Dresdner-Bank.com> on 2004/03/12 19:39:03 UTC

sent specific html:hidden field depending which html:link was use d

Hello,
 
i´ve a problem, that I`ve two links and each link has an html:hidden field.
I´want to sent only the hidden Field which is included in the clicked link.
Is this possible?
 
My code shows as follows:
 
<html:link href="JavaScript:sendFormNeuanlage();">
     <html:hidden property="CMD" value="aktualisieren"/>
     <img src="/images/bAngebotAktualisieren.gif" width="140" height="14"
alt="aktualisieren" hspace="14" border=0">
</html:link>

<html:link href="JavaScript:sendFormNeuanlage();" styleId="bestaetigen">
     <html:hidden property="CMD" value="bestaetigen" name="bestaetigen"/>
     <img src="/images/bAbsenden.gif" width="84" height="14" alt="absenden"
border="0">
</html:link>
 
Thanks for any ideas,

Jan


Re: sent specific html:hidden field depending which html:link was used

Posted by atta-ur rehman <at...@numetrics.com>.
Hello Jan,

One way I see it could be done is to move the hidden element out of both of
the links and in parameterize your  JavaScript:sendFormNeuanlage() method
for 'bestaetigen' and 'aktualisieren' and let this javascript method set the
value of the hidden field.

function sendFormNeuanlage(what) {
    document.forms[0].CMD.value=what;
}

<html:hidden property="CMD"/>

<html:link href="JavaScript:sendFormNeuanlage('aktualisieren');">
    <img src="/images/bAngebotAktualisieren.gif" width="140" height="14"
alt="aktualisieren" hspace="14" border=0">
</html:link>

<html:link href="JavaScript:sendFormNeuanlage('bestaetigen' );"
styleId="bestaetigen">
          <img src="/images/bAbsenden.gif" width="84" height="14"
alt="absenden" border="0">
</html:link>


hope this helps.

ATTA

----- Original Message ----- 
From: "Zmitko, Jan" <Ja...@Dresdner-Bank.com>
To: <st...@jakarta.apache.org>
Sent: Friday, March 12, 2004 10:39 AM
Subject: sent specific html:hidden field depending which html:link was used


Hello,

i´ve a problem, that I`ve two links and each link has an html:hidden field.
I´want to sent only the hidden Field which is included in the clicked link.
Is this possible?

My code shows as follows:

<html:link href="JavaScript:sendFormNeuanlage();">
     <html:hidden property="CMD" value="aktualisieren"/>
     <img src="/images/bAngebotAktualisieren.gif" width="140" height="14"
alt="aktualisieren" hspace="14" border=0">
</html:link>

<html:link href="JavaScript:sendFormNeuanlage();" styleId="bestaetigen">
     <html:hidden property="CMD" value="bestaetigen" name="bestaetigen"/>
     <img src="/images/bAbsenden.gif" width="84" height="14" alt="absenden"
border="0">
</html:link>

Thanks for any ideas,

Jan




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