You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Tommy (JIRA)" <ji...@apache.org> on 2008/01/17 07:27:04 UTC

[jira] Created: (WW-2431) How I can popup a javascript confirm dialog before s;url action

How I can popup a javascript confirm dialog before s;url action
---------------------------------------------------------------

                 Key: WW-2431
                 URL: https://issues.apache.org/struts/browse/WW-2431
             Project: Struts 2
          Issue Type: Improvement
    Affects Versions: 2.0.11
         Environment: windows xp, jdk 6.0.3, tomcat 6.0.14
            Reporter: Tommy


I want to add javascript before I execute s:url action, the confirmed message from user decide whether further to trigger a s:url action

The origin code:
                    <s:url id="removeUrl" action="remove">
                        <s:param name="id" value="id" />
                    </s:url>
                    <s:a href="%{removeUrl}" theme="ajax" targets="persons">Remove</s:a>

I tried 'preInvokeJS' in s:a tag, it does popsup a confirm message, but user cannot terminate the loading s:url action. 
e.g. confirm('Are you sure you want to delete this item?')"     if a user a choose no button, s:url remove action still be processed.

Appreciated any idea for this issue, thanks in advance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WW-2431) How I can popup a javascript confirm dialog before s;url action

Posted by "Anonymous (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]


    Resolution: Duplicate  (was: Not A Problem)
        Status: Resolved  (was: Closed)

> How I can popup a javascript confirm dialog before s;url action
> ---------------------------------------------------------------
>
>                 Key: WW-2431
>                 URL: https://issues.apache.org/struts/browse/WW-2431
>             Project: Struts 2
>          Issue Type: Improvement
>    Affects Versions: 2.0.11
>         Environment: windows xp, jdk 6.0.3, tomcat 6.0.14
>            Reporter: Tommy
>
> I want to add javascript before I execute s:url action, the confirmed message from user decide whether further to trigger a s:url action
> The origin code:
>                     <s:url id="removeUrl" action="remove">
>                         <s:param name="id" value="id" />
>                     </s:url>
>                     <s:a href="%{removeUrl}" theme="ajax" targets="persons">Remove</s:a>
> I tried 'preInvokeJS' in s:a tag, it does popsup a confirm message, but user cannot terminate the loading s:url action. 
> e.g. confirm('Are you sure you want to delete this item?')"     if a user a choose no button, s:url remove action still be processed.
> Appreciated any idea for this issue, thanks in advance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (WW-2431) How I can popup a javascript confirm dialog before s;url action

Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antonio Petrelli closed WW-2431.
--------------------------------

    Resolution: Not A Problem

Please don't use Jira to ask questions.
Post a message to the Struts Users mailing list:
http://struts.apache.org/mail.html

> How I can popup a javascript confirm dialog before s;url action
> ---------------------------------------------------------------
>
>                 Key: WW-2431
>                 URL: https://issues.apache.org/struts/browse/WW-2431
>             Project: Struts 2
>          Issue Type: Improvement
>    Affects Versions: 2.0.11
>         Environment: windows xp, jdk 6.0.3, tomcat 6.0.14
>            Reporter: Tommy
>
> I want to add javascript before I execute s:url action, the confirmed message from user decide whether further to trigger a s:url action
> The origin code:
>                     <s:url id="removeUrl" action="remove">
>                         <s:param name="id" value="id" />
>                     </s:url>
>                     <s:a href="%{removeUrl}" theme="ajax" targets="persons">Remove</s:a>
> I tried 'preInvokeJS' in s:a tag, it does popsup a confirm message, but user cannot terminate the loading s:url action. 
> e.g. confirm('Are you sure you want to delete this item?')"     if a user a choose no button, s:url remove action still be processed.
> Appreciated any idea for this issue, thanks in advance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.