Hi Everyone,
I have a link on my page, and I want it to open it in a new window (not a new tab) when clicking it. Currently, this link points to a new screen action, and in this new screen action I have a RunJavaScript server action with the following script:
"window.open('"+EncodeJavaScript(URL)+"')"
However, it still open the link in new tab (on both IE11 and Chrome). Is there any solution to this problem?
Best,
Yifan
Hi Yifan,
Try the following code:
"window.open('https://www.google.pt', 'newwindow','width:500,height:500'); return false;"
Thank you.
Hello Yifan,
Only with HTML is not possible, try with this javascript.
<a href="www.google.com"
onclick="window.open('http://www.google.com',
'newwindow',
'width=600,height=600');
return false;"
>Open in new window</a>
https://www.w3schools.com/code/tryit.asp?filename=GKBENBNX8OE6
Hello Yifan,window.open("www.google.com","","toolbar=no,status=no,menubar=no,location=center,scrollbars=no,resizable=no,height=500,width=657");This will create a new window upon click just replace the google part with your URL
Here is a sample.
Check the code bellow:
Check the oml with the sample.
Hope I could help you.
Cheers,
Carlos Lessa
Thanks everyone! Turns out that 'width: 500, height:500' is crucial in this.