/    Sign up×
Community /Pin to ProfileBookmark

Thumbnail to fullsize image popup windows?

Okay. Well. I have a bunch of my photography on a silly [unfinished] geocites website [[url]http://www.geocities.com/ohmygodmuffin/silentsecret/photography.htm[/url]] and what I wanted to do was have the thumbnails open a popup window the exact size of the fullsize image…but I don’t know how, and I can’t find anywhere that could tell me how. As it is now, I had to make a set size for the popup windows which is really annoying because it involves a lot of resizing and scrolling the windows…I did search this messageboard for help before posting this, but nothing was really working. So um any help would be appreciated?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@Warren86Nov 11.2004 — <HTML>

<Head>

<Script Language=JavaScript>

var largerView = "";

function openFullSize(Pix){

if (largerView != ""){largerView.close()}
nullIMG.src = Pix;
wStr = nullIMG.width;
offsetW = wStr;
wStr = wStr+20;
wStr = "width="+wStr;
hStr = nullIMG.height;
offsetH = hStr;
hStr = hStr+20;
hStr = "height="+hStr;
lStr = (screen.width-50-offsetW)/2;
lStr = "left="+lStr;
tStr = (screen.availHeight-50-offsetH)/2;
tStr = "top="+tStr;
largerView = window.open(Pix,"FullSize","toolbar=0,status=0, "+tStr+","+lStr+","+wStr+","+hStr+" ");
largerView.document.images[0].alt = "This is a description";
}

function buildSupport(){

styleStr = "<Style> .placeHolder {Position:Absolute;Top:-2000}</Style>";
divStr = "<Div class=placeHolder><IMG Src=Null ID=nullIMG></Div>"
document.write(styleStr);
document.write(divStr);
}

buildSupport();

</Script>

</Head>

<Body>

<center>

<H3>Automatic centering and sizing of popup window</h3>

<Img Src='Any.jpg' width=200 height=200 onclick="openFullSize(this.src)"></a>

</center>

</Body>

</HTML>
×

Success!

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