> From: PADALA, SANDHYA (SBCSI) [mailto:[EMAIL PROTECTED] 
> <html:link page="/attachment.do" onclick="attSubmit()">       
> attName
> </html:link>
> 
> <SCRIPT language="javascript">
> function attSubmit(ID)
> {
>       document.forms[0].action="/attachment.do";
>       document.forms[0].submit();
> }
> </SCRIPT>

Check a couple of things-- that you don't have a form element called
'submit', or else there will be confusion between 'submit' and
'submit()'.  

Also, why does your function accept an argument (ID) that never gets
used?  In other words, you're calling the attSubmit() function, but
there is only a one-argument version attSubmit( a ).   In Java this
would never work, I am not sure how JavaScript handles such things.

Other than that, I have pretty much the same thing you do:

<script language="JavaScript">
function standardTab() {
  document.forms[0].target="_self";
  document.forms[0].submit();
}
</script>

I don't use <html:link>, so seeing the generated HTML would also help
make sure nothing's wrong there.  My links are generated with
StrutsMenu, and switching tabs necessitates submitting the form on the
current tab, or else the input is lost.

Hope that helps!

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 


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

Reply via email to