You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pablo Vázquez Blázquez <pv...@denodo.com> on 2007/10/01 09:27:51 UTC

simulate event on struts 2 tag

Hi all!

I have the following code:

<s:a id="removeProject" theme="ajax" notifyTopics="/submitProjectForm"
        loadingText=" " targets="workspaceAjaxContent" executeScripts="true"
        onclick="var a = confirm('Are you sure you want to do this?');
        if (a) {
            var link = document.getElementById('removeProject');
            link.href = '${removeProjectUrl}';
            link.onclick = '';
            link.click();
            return false;
        }">
    <fmt:message key="Project.remove"/>
</s:a>

The project is successfully removed and I get the right result, but it 
is shown in the whole page, not in the "workspaceAjaxContent" target. 
That is, it seems like if click() event doesn´t take care about the 
"targets" attribute.

Any suggestion?

Thanks!


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