homepage Welcome to WebmasterWorld Guest from 54.166.105.24
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
javascript
problem of location in a command window.open()
masterjr




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

Hello.
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.

<html>

<head>

<script language="JavaScript">
<!-- Begin
pubs=new Array();
liens=new Array();
pubT=0;
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>
<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 -->
</script>

</head>
<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;
liens[0]='url0';
pubs[1]="image1"
liens[1]="url1"

AfficherPub(pubs,10000);
}

// End -->
</script>

</body>
</html>

thank you

 

jsbwm




msg:1495127
 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.
-jim

masterjr




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

thank you.

tedster




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

Continued on this thread [webmasterworld.com]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved