javascript:window.open

Le Pache 17 May, 2016
Hi,
I have to open an URL in a popup window when my form is submitted.
I have put a custom code into a sumit event :
<a href="javascript:window.open(MY_URL','_blank','height=700, width=900, toolbar=no, menubar=no, scrollbars=no, resizable=yes, location=no, directories=no, status=no');">
Validez vos informations</a>

MY_URL is opened in a popup window as expected but the form returns also a new page : javascript:window.open(MY_URL','_blank','height=700, width=900, toolbar=no, menubar=no, scrollbars=no, resizable=yes, location=no, directories=no, status=no
with [object Window]

What am I missing ?
Thanks for reply
GreyHead 17 May, 2016
Hi La Pache,

_blank is the instruction to open the URL in a new window - does that need to be different?

Bob
Le Pache 17 May, 2016
Thank you Bob for your reply.
Yes, a new popup window is opened as expected with _blank but a new page called by <a href...> is open under the popup.
My problem is how to just have the popup and redirect my page on a "thanks message" when I close my popup with a window.close ?
Marion
GreyHead 17 May, 2016
Hi Le Pache,

I'm sorry, but I don't understand what the problem is here? What do you mean when you say that the form displays a new page - that sounds normal to me. You'll get the form On Submit output displayed.

Bob
Le Pache 17 May, 2016
You are right, Bob. The problem is not the form that displays a new page (it does) but the custom code link in On submit event.
I have changed the <a href ...> with
<input type="button" class="btn btn-success" onClick="javascript:window.open('MY_URL','_blank','height=700, width=900, toolbar=no, menubar=no, scrollbars=no, resizable=yes, location=no, directories=no, status=no');" value="Validez vos informations">

Thank you for the explainations
This topic is locked and no more replies can be posted.