/    Sign up×
Community /Pin to ProfileBookmark

code renders in Firefox and Safari, but not IE

For some reason the following code renders just fine in Firefox and Safari, but some of my IE users have told me that when they click the link that leads to this page, they get an error message. To see for yourself, the url is here:

[url]http://www.mythopoedia.com/sl_navigator_pane.html[/url]

Once there, click chapter one.

The code is here:

<html>
<head>

<link rel=”stylesheet” type=”text/css” href=”slbookpage.css”>

<title>
Silverlance
</title>

</head>
<body>
<div class=”titlepage”>
<div class=”maintitlelink”><a href=”sl_1_1.html”><img src=”button_enter” border=”0″ alt=”enter”/></a>
</div>
</div>

</body>

</html>

to post a comment
HTML

6 Comments(s)

Copy linkTweet thisAlerts:
@FangFeb 05.2009 — The windowname must be limited to alphanumeric and underscore characters.

The 3 functions can easily be combined into one.

https://developer.mozilla.org/En/DOM/Window.open
Copy linkTweet thisAlerts:
@ptcauthorFeb 05.2009 — Hi Fang,

This is the code for the java script I'm using:

function popup(mylink, windowname)

{

if (! window.focus)return true;

var href;

if (typeof(mylink) == 'string')

href=mylink;

else

href=mylink.href;

window.open(href, windowname, 'width=552,height=760,scrollbars=yes');

return false;

}


And this is the window it calls:

<li><a href="sl/title_page_1.html" onclick="return popup(this, 'sl_book_1/title_page_1.html')"><button><font color="darkblue">chapter 1</font></button></a></li>

The window names are all alphanumeric underscored. Can you see anything else that should be corrected?

Thanks for your response!

ptc
Copy linkTweet thisAlerts:
@FangFeb 05.2009 — and the slash, the period???
Copy linkTweet thisAlerts:
@ptcauthorFeb 05.2009 — Ah, I see. Thank you.

So the link and the window name in the function need to match the link and window name in the code which the function calls, right?

Is this correct:

function popup(sl/title_page_1.html, sl_book_1_title_page_1)

{

if (! window.focus)return true;

var href;

if (typeof(mylink) == 'string')

href=mylink;

else

href=mylink.href;

window.open(href, windowname, 'width=552,height=760,scrollbars=yes');

return false;

}


And this is the window it calls:

<li><a href="sl/title_page_1.html" onclick="return popup(this, 'sl_book_1_title_page_1')"><button><font color="darkblue">chapter 1</font></button></a></li>
Copy linkTweet thisAlerts:
@FangFeb 05.2009 — 
So the link and the window name in the function need to match the link and window name in the code which the function calls, right?[/QUOTE]

No, the window name can be an valid string.

Read the link I gave in an earlier post.
Copy linkTweet thisAlerts:
@ptcauthorFeb 05.2009 — Seems to be working now, thanks Fang!
×

Success!

Help @ptc spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...