<html:link> and javascript

View: New views
2 Messages — Rating Filter:   Alert me  

<html:link> and javascript

by umainb :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I have a link in my jsp  

<html:link  page="/doNotVerifyList.do?action=delete"  paramId="phone" paramName="resultsList" paramProperty="phoneNumber"><bean:message key="admin.console.verify.numbers.delete"/></html:link>

which deletes a record from the list of numbers.

When the user clicks on the link above, we need a javascript popup "Are you sure you want to delete the number?" with "OK" and "Cancel"

How I can achieve that?
Thanks.

Re: <html:link> and javascript

by Laurie Harper :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

umainb wrote:

> Hello,
>
> I have a link in my jsp  
>
> <html:link  page="/doNotVerifyList.do?action=delete"  paramId="phone"
> paramName="resultsList" paramProperty="phoneNumber"><bean:message
> key="admin.console.verify.numbers.delete"/></html:link>
>
> which deletes a record from the list of numbers.
>
> When the user clicks on the link above, we need a javascript popup "Are you
> sure you want to delete the number?" with "OK" and "Cancel"
>
> How I can achieve that?

Use html:link's onclick attribute to invoke the popup dialog just as you
would with vanilla HTML. html:link supports all the Javascript event
hook attributes you'd expect:

http://struts.apache.org/1.3.8/struts-taglib/tlddoc/html/link.html

L.


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