|
-
Aug 5th, 2001, 10:56 AM
#1
Thread Starter
Fanatic Member
click the picture, and bigger oh much bigger :)
Hi
i got this code from www.htmlgoodies.com that will make a slide show, but i would like to know how i can change this so when the user clicks on the picture, it will open the bigger version that i have in a new window.
thanks for the help
here is the code that i have
Code:
<SCRIPT LANGUAGE="JavaScript">
var num=1
img1 = new Image ()
img1.src = "information.gif"
img2 = new Image ()
img2.src = "interference.gif"
img3 = new Image ()
img3.src = "message.gif"
img4 = new Image ()
img4.src = "nervous.gif"
text1 = "Text for Picture One"
text2 = "Text for Picture Two"
text3 = "Text for Picture Three"
text4 = "Text for Picture Four"
function slideshowUp()
{
num=num+1
if (num==5)
{num=1}
document.mypic.src=eval("img"+num+".src")
document.joe.burns.value=eval("text"+num)
}
function slideshowBack()
{
num=num-1
if (num==0)
{num=4}
document.mypic.src=eval("img"+num+".src")
document.joe.burns.value=eval("text"+num)
}
</SCRIPT>
<!-- The Image and Form Codes are Below -->
<CENTER>
<IMG SRC="information.gif" NAME="mypic" BORDER=0 HEIGHT="100" WIDTH="100">
<p>
<FORM NAME="joe">
<INPUT TYPE="text" WIDTH="100" NAME="burns" VALUE="Text For Picture One">
</FORM>
<A HREF="JavaScript:slideshowBack()"> Back</A>
<A HREF="JavaScript:slideshowUp()"> Next</A>
Cheers
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
[ Galahtech.com] | [ My Site] | [ Fishsponge] | [ UnixForum.co.uk]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|