struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Van Wart <sc...@indosoft.com>
Subject Re: Question about Lookup dispatch action
Date Sat, 19 Aug 2006 22:30:45 GMT
Puneet Lakhina wrote:
>
> OK One more thing, if you need to call this javascript method even 
> from ur
> submit button, to set the property value then you can do
>
> <html:submit value="submitText"  onclick =  "return 
> false;onClickSubmit()"
> />
>
> Notice the  return false there.
>
> In case of a link simply do
>
> <a onclick="onClickSubmit()" />
>
> I hope this was what you wanted.

The "return false;" would have to go LAST, otherwise onClickSubmit() 
wouldn't get called.

And as he's using LookupDispatchAction, the value="submitText" would 
have to be removed and replaced with a child tag "<bean:message 
key="submit.text" />" instead.

So it might look like:

<html:submit onclick="onClickSubmit(); return false">
  <bean:message key="submit.text" />
</html:submit>

- Scott

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


Mime
View raw message