Post by natiria » Sun Aug 14, 2011 12:21 pm

Is there a code/way to get a banner link when clicked on to open to a new window or pop up instead of loading the link in the same window automatically?

Thanks!

Newbie

Posts

Joined
Sun Aug 14, 2011 12:19 pm

Post by uksitebuilder » Sun Aug 14, 2011 2:53 pm

instead of putting:

http://www........... as the link

Try

javascript:window.open('http://www...','NameIt');

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by SXGuy » Sun Aug 14, 2011 4:39 pm

has it been that long that people have forgotten target="_blank" rather than use javascript?

<a href="yourlink" target="_Blank">Link</a>

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by uksitebuilder » Sun Aug 14, 2011 6:40 pm

Depends if you want to keep W3C compliant in an XHTML template

Target blank is fine in HTML4/5 etc but not XHTML

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by natiria » Mon Aug 15, 2011 12:25 am

Thanks a bunch! ^-^

Newbie

Posts

Joined
Sun Aug 14, 2011 12:19 pm

Post by emilygraham » Mon Oct 24, 2011 8:05 pm

Thanks for the info on the above. When i use the javascript:window.open.... it opens the link in a new window, but the original page displays the text [object] on a white background, rather than continuing to display the original page - any ideas why this might be the case? Many thanks for your help....

New member

Posts

Joined
Wed Sep 14, 2011 7:26 pm

Post by uksitebuilder » Wed Oct 26, 2011 5:37 pm

Try the following syntax instead

javascript:void(window.open('http://www.opencart.com','name'));

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by emilygraham » Fri Oct 28, 2011 8:14 pm

Thanks Simon that worked a treat :-)

New member

Posts

Joined
Wed Sep 14, 2011 7:26 pm

Post by dazthephot » Thu May 09, 2013 11:43 pm

Easy when you know how ha ha......been fiddling with this all afternoon!

Thank you.

New member

Posts

Joined
Tue Jul 05, 2011 6:31 pm

Post by tmart » Mon Sep 28, 2015 6:27 am

Thank you so much!!!

Image
Logo Printed / Embroidered T-Shirts
Polo Shirts, Sweatshirts & Hoodies

http://www.tmart.in


New member

Posts

Joined
Fri Jan 21, 2011 2:02 am

Who is online

Users browsing this forum: No registered users and 6 guests