/    Sign up×
Community /Pin to ProfileBookmark

Javascript won’t stop loading.

This javascript file won’t stop loading. Follow this URL and click the image to enlarge the image to see an example.
[url]http://www.shirtsandsweatshirts.com/hs141-harvard-square-mens-water-resistant-microfiber-v-neck-wind-shirt.html[/url]

[CODE]function makeWin(imsrc, ww, wh) {
ww=ww+25; wh=wh+50;
w1=window.open(”,’w1′,’width=’+ww+’,height=’+wh+’,status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes’);
w1.document.open();
w1.document.write(“<html><head><title>Image Zoom</title><META HTTP-EQUIV=”Pragma” CONTENT=”no-cache”><META HTTP-EQUIV=”Expires” CONTENT=”-1″></head>”);
w1.document.write(“<body bgcolor=’#FFFFFF’ text=’#000000′ leftmargin=2 topmargin=10><p align=center>”);
w1.document.write(“<img name=theimg src=” + imsrc + “><br>”);
w1.document.write(“<a href=”javascript:window.close();”><font size=1 face=tahoma color=#000000>close window</font></a></body></html>”);
w1.document.focus();
}[/CODE]

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@astupidnameDec 02.2009 — Remove this line:
w1.document.focus();
First off, the document element does not have a focus method, the window element (w1 in this case) does. Also should, since you are writing to the new window, use (window object).document.close() when done writing to it. So you could replace the above with:
w1.document.close();
w1.focus();
Copy linkTweet thisAlerts:
@mgoblue4authorDec 02.2009 — AWESOME it works! Thank you very much, I know very little about javascript and you made it really easy to understand. THANKS
Copy linkTweet thisAlerts:
@astupidnameDec 02.2009 — P.S. Glad it's working for you, but on the other hand.... the last thing in the world we need on the internet is another one of these ridiculous 'zoom image' popups that does not actually contain a larger image or more info. I personally can't stand it when I click on one of these only to find the same image. Makes me think either the designer/developer is retarded/stupider than !#$$, or else the joke is on me for being stupid enough to believe you when you said 'zoom image'. Hoping you will rectify.... :rolleyes:

P.P.S. Oh, wait I see now, the 'zoom image' is actually about 25px bigger, thanks that really helps alot.... :p
Copy linkTweet thisAlerts:
@mgoblue4authorDec 03.2009 — Ha ha, don't worry. How big the image zooms is all up to the client. If they want a bigger image zoom, then they must upload a bigger image. This is not my website so I do not have control over how big the images are ?
×

Success!

Help @mgoblue4 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,
)...