Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies


problem of location in a command window.open()



10:12 pm on Jan 4, 2002 (gmt 0)

10+ Year Member

i 've a bug in my code.tHis the all code.Infact i want to open a new window when the user click on the image .I should remplace in the the tag <a onclick="">:"location=liens[pub]" by window.open=(url,_blank',"menubar=yes,...").The problem is the url.Please find the time to look the aall code maybe you'll find how to help me.



<script language="JavaScript">
<!-- Begin
pubs=new Array();
liens=new Array();
pub = -1;
function AfficherPub(pubs,pubDelay1) {
pubDelay = pubDelay1;

pub = pub + 1;
if (pub == pubs.length)
pub = 0;
document.pubImg.src = pubs[pub];
pubT = setTimeout("AfficherPub(pubs,pubDelay)", pubDelay1);
// End -->
<script language="JavaScript">
<!-- Begin
function VersionNavigateur(Netscape, Explorer) {
if ((navigator.appVersion.substring(0,3) >= Netscape && navigator.appName == 'Netscape') ¦¦
(navigator.appVersion.substring(0,3) >= Explorer && navigator.appName.substring(0,9) == 'Microsoft'))
return true;
else return false;
// End -->

<body onUnload="clearTimeout(pubT)">

<a href="" onClick="location=liens[pub]; return false">
<img name="pubImg" src="image0" width="20" height="20" border="0"></a>

<script language="JavaScript">
<!-- Begin
if (VersionNavigateur(3.0,4.0))
pubs[0] = document.pubImg.src;


// End -->


thank you


10:45 pm on Jan 4, 2002 (gmt 0)

I dunno if i get what you are trying to do but if you are asking about an alternitive to <a href="javascript:"> then i would try <a href="#" onClick="myfunction();">. I don't really understand your questions but i hope this helped a bit.


12:39 am on Jan 5, 2002 (gmt 0)

10+ Year Member

thank you.


6:52 am on Jan 5, 2002 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Continued on this thread [webmasterworld.com]

Featured Threads

Hot Threads This Week

Hot Threads This Month