/    Sign up×
Community /Pin to ProfileBookmark

Javascript popups to display full size photos

Greetings, I am from a network infrastructure background just getting into web page design. I have a problem with a website design I took over regarding popup windows using Javascript. When you click on a photo a new browser should appear with the full size image but instead an error appears with the name of the temporary htm that is supposed to be created, saying that it cannot be found. I checked the hyperlink properties and they appear to be correct as far as referencing the image, and the temporary htm file is referenced in the Javascript code for the web page. I know that I’m missing something simple but I can’t figure it out. Can anyone point me in the right direction? I would appreciate it. thanks to all! – Winman

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@konithomimoJul 26.2006 — Without any real code it is hard to say what is wrong. Here are a few things to consider though.

If it is a popup window, then you must use window.open ()

While using window.open() you can give it a URL to open, or leave the URL blank to open a new window.

In the case that you do not want to use window.open(), you can use target="_blank", which will then use window.open() for you to open the new window.
Copy linkTweet thisAlerts:
@WinmanauthorJul 27.2006 — Here is the code from one page, I hope this shows what the problem is. I appreciate your help konithomimo

<!--BEGIN Pop-up Images Script-->

<SCRIPT Language="JavaScript">

<!--

var pic = null

var popImg = null // use this when referring to pop-up image

var picTitle = null

var imgCount = 0

var imgWinName = "popImg"

function openPopImg(picName, windowTitle, windowWidth, windowHeight){

closePopImg()

picTitle = windowTitle

imgWinName = "popImg" + imgCount++ //unique name for each pop-up window

popImg = window.open(picName, imgWinName,

"toolbar=no,scrollbars=no,resizable=no,width="

+ (parseInt(windowWidth)+20) + ",height="

+ (parseInt(windowHeight)+15))

}

function closePopImg(){ // close pop-up window if it is open

if (navigator.appName != "Microsoft Internet Explorer"

|| parseInt(navigator.appVersion) >=4) //do not close if early IE

if(popImg != null) if(!popImg.closed) popImg.close()

}

function setStatus(msg){

status = msg

return true

}

//-->

</SCRIPT>
×

Success!

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