1

How can i opens a new tab in magento using javascript to call a other site? When i use this, a new window opens:

var w = window.open('/offerte/<?php echo $debiteur ;?>.pdf','_blank','fullscreen=yes');

1 Answer 1

1

You want to open the url in a new tab as the code is running?

Giving _tab creates a new tab.

var w = window.open('/offerte/<?php echo $debiteur ;?>.pdf','_tab','fullscreen=yes');

Same

window.open("http://www.youraddress.com","_self")

New tab

window.open("http://www.youraddress.com","_tab")

I hope any of the examples can help you out with this problem.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.