...

View Full Version : Help with a Script from this site



Gramps
10-05-2011, 04:20 AM
I need to have a new window or tab to open for the random image w/link script found here http://javascriptkit.com/script/cut144.shtml

I have tried target=blank but that doesn't work. Your help would be appreciated.

Thank you

Old Pedant
10-05-2011, 04:44 AM
WHEN is the new window supposed to open?

When the main page first loads? When the user clicks on something?

CAUTION: If you want it to happen when the page first loads, most popup blockers will block it. Most blockers only allow popups that happen because of human interaction.

jassi.singh
10-05-2011, 08:20 AM
Hi,
Refer http://forums.asp.net/t/848436.aspx/1
http://bytes.com/topic/asp-net/answers/604386-avoid-pop-up-blocker

Gramps
10-05-2011, 04:37 PM
Hi

When clicking on the random image, I would like the link destination to open in a new window or tab instead of "On Top" as the code currently stands

Old Pedant
10-05-2011, 07:29 PM
Oh, is that all.

Trivial.



document.write('<a href="' + imagelinks[ry]+ '" target="_blank"><img src="'+myimages[ry]+'" border=0></a>');

Gramps
10-05-2011, 08:53 PM
LOL easy when you know :) Thanks that did it!


Oh, is that all.

Trivial.



document.write('<a href="' + imagelinks[ry]+ '" target="_blank"><img src="'+myimages[ry]+'" border=0></a>');



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum