![]() |
Buttonsrow link won't open new window
Hi everybody, I've been adding new links using my standard buttons that are used throughout my site, and although they work fine for anchors within pages, I can't get them to open a new window for a new page, from a static page.
The code I'm using is <p class="ButtonsRow">{include file="buttons/button.tpl" button_title=$lng.lbl_open_new_window href="https://www.mywebsite.com/home.php" target="_blank" style="button"}</p> In this case, the target="_blank" isn't working. It doesn't appear in the source code when I checked the HTML on the page itself, so something's not quite right here. Can anybody help? The source HTML code that the above produces looks like this, if it's any help: <p class="ButtonsRow"> <table cellspacing="0" cellpadding="0" onclick="javascript: self.location='https://www.mywebsite.com/home.php';" class="ButtonTable"> <tr><td><img src="/skin1/images/custom/but1.gif" class="ButtonSide" alt="" /></td><td class="Button"><font class="Button">Open new window</font></td><td> <img src="/skin1/images/custom/but2.gif" class="ButtonSide" alt="" /></td></tr> </table> </p> |
Re: Buttonsrow link won't open new window
I should add that this code is being used on a static page, and I've ticked the box to parse Smarty tags.
|
Re: Buttonsrow link won't open new window
I contacted Qualiteam and the answer is as follows:
<p class="ButtonsRow">{include file="buttons/button.tpl" button_title=$lng.lbl_open_new_window href="javascript: window.open('https://www.mysite.com/home.php');" target="_blank" style="button"}</p> i.e. change href="https://www.mywebsite.com/home.php" target="_blank" to href="javascript: window.open('https://www.mysite.com/home.php'); target="_blank" Just thought I'd post up the answer in case anybody else ever had/has this problem. |
All times are GMT -8. The time now is 01:32 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.