Discussions

Web tier: servlets, JSP, Web frameworks: how to open a new window by executing an antion in weWork

  1. Hi,
        I need to open a window on click of a button but that must be executed through an action,on submit of that action i have to open a window.

    currently iam calling a window.open(url) but this is not calling the action specified.Can anyone please help me in this regard.

    Regards
    Samy
  2. If you mentioned .do name in the url, then it would call specifed action. I followed the same, is working for me.

    <form action="" name="regForm" onSubmit="javascript:openRegTarde();return false">
    .....
    ....

    function openRegTarde() {
    ...
    ...
    url= <full path>/filename.do?selVal=value;
    window.open(url, null, "height=400, width=500, status=yes, toolbar=no, resizable=no, scrollbars=no, menubar=no,location=no,status=no");
    }

    Cheers.