/    Sign up×
Community /Pin to ProfileBookmark

netscape: pop up problem

on my [URL=http://stevegh.com]website[/URL] on the right there are some images, and you click on 1 2 or 3 to change the image displayed via javascript, then when you click on the image an autosize pop window comes up. this works fine in ie, but in netscape/mozilla when you change the image, it acts like its loading something still, and when you click on the image the popup comes up but doesnt load the image. any reason why?

thanks
-s

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@crh3675Apr 12.2004 — Your javascript is missing an open() for the document:

<i>
</i> with (imgWin.document)
{
open(); //ADD THIS
writeln('&lt;html&gt;&lt;head&gt;&lt;title&gt;Loading...&lt;/title&gt;');
writeln('&lt;style type="text/css"&gt;&lt;!-- body { margin: 0px; } --&gt;&lt;/style&gt;&lt;/head&gt;');
writeln('&lt;body onload="self.focus();"&gt;&lt;img id="pic" style="display:none" /&gt;&lt;/body&gt;&lt;/html&gt;');
close();
}
Copy linkTweet thisAlerts:
@AroundTheFurauthorApr 12.2004 — No that didn't seem to work. If in netscape/mozilla/safari you click on the first image there, it works, its only when you try to change the image by clicking the 1,2, or 3 that they wont load in the pop up.
Copy linkTweet thisAlerts:
@AroundTheFurauthorApr 12.2004 — I know see that when the page is loaded, a rollover on the picture says that the target is the picture it should be, but after clicking the 1,2 or 3 a rollover produces this in the status bar: http://stevegh.com/undefined

so im assuming its something wrong with the javascript but i can't figure out what.
Copy linkTweet thisAlerts:
@crh3675Apr 12.2004 — Use getAttribute and setAttribute instead of assigning the attributes directly:

<i>
</i> document.getElementById('placeholder').setAttribute("src",whichpic.getAttribute("href"));
document.getElementById('link').setAttribute("href",whichpic.getAttribute("src"));
Copy linkTweet thisAlerts:
@AroundTheFurauthorApr 12.2004 — thanks, works now.
×

Success!

Help @AroundTheFur 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 5.29,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...