| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Buttonsrow link won't open new window | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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>
__________________
X-Cart Gold Version 4.3.2 |
|||||||
#2
|
|||||||
|
|||||||
![]() I should add that this code is being used on a static page, and I've ticked the box to parse Smarty tags.
__________________
X-Cart Gold Version 4.3.2 |
|||||||
#3
|
|||||||
|
|||||||
![]() 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.
__________________
X-Cart Gold Version 4.3.2 |
|||||||
|
|||
X-Cart forums © 2001-2020
|