getyourbiglobst posted this at 19:34 — 22nd December 2001.
hello-
i'm trying to get this script to have each thumbnail on my site open up in an html page, without making the html page for each thumnail.
does this make sense?
does the script?
---in head---
<script language="javascript">
</script>
---in body---
thanks.
mmi posted this at 20:58 — 22nd December 2001.
They have: 457 posts
Joined: Jan 2001
hey getyourbiglobst - yer script works - you might want to set other attributes for the pop-ups, e.g., width and height - is there anything about the function that you want to "fancy up?" - e.g., you could have the windows sized to fit the dimensions of the larger images
Web Xpertz Community Forums for Webmasters & Developers
Where You Can Learn, Advise, and Have Fun in the Process
Busy posted this at 21:07 — 22nd December 2001.
He has: 6,151 posts
Joined: May 2001
Its the same method as if you were opening a html page, just swap the file names. and images usually have the tolbar, scrol bar etc set to 0
but using the width and height tags for this new window can have problems. As different browsers have different default margin settings, the picture can be cut off bottom/right with a white gap top/left, so always make the pop up bigger than needed or just use a basic html page with margins at 0
or you can write the html page within the code:
<script ...>
function popimage(){
htmlCode =
'<html><head><title>popup</title></head>'
+ '<body .....
....
+ '</body></html>
}
</script>
and your link would be:
<a href="javascript:popimage()">
'or inline:
<a href="javascript:openPopWin('image.jpg', 250, 195,
'menubar,scrollbars,resizable,status')">link</a>
among other ways
edit: cant get rid of the dang smiles, top one is ": p" no space and second one is ": o" no space
Suzanne posted this at 21:54 — 22nd December 2001.
She has: 5,507 posts
Joined: Feb 2000
I checked the "Disable Smilies in This Post" checkbox in the Options for you, Busy.
Suzanne
P.S. zerocattle.com/examples/popUp.html is based on the tutorials at irt.org, if your looking for a better popup code. You can easily add in the automatic writing of the HTML page if you want that.
I find adding 15 px to the size of the image (both height and width) leaves a fairly nice border around the image in IE5, but each browser leaves a different border, so that's not foolproof.
P.P.S. You could also use a combination of server-side scripting and javascript to pop the image into a template.
Busy posted this at 04:00 — 23rd December 2001.
He has: 6,151 posts
Joined: May 2001
Thanks, I'm always forgetting about that option
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.