homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

problem of location in a command window.open()

10+ Year Member

Msg#: 28 posted 10:12 pm on Jan 4, 2002 (gmt 0)

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+ Year Member

Msg#: 28 posted 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.


10+ Year Member

Msg#: 28 posted 12:39 am on Jan 5, 2002 (gmt 0)

thank you.


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

Msg#: 28 posted 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