logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > Javascript and JS frameworks
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 02-15-2009, 07:46 PM   #1
shout it
 
Join Date: Sep 2008
Posts: 8
Default image display help

i have been using a image display on a website the code is below:

<SCRIPT LANGUAGE="JavaScript">

var num=1
img1 = new Image ()
img1.src = "images/Street scene index page.jpg"
img2 = new Image ()
img2.src = "images/World Map.jpg"
img3 = new Image ()
img3.src = "message.gif"
img4 = new Image ()
img4.src = "nervous.gif"

text1 = "Text for Picture One AND ADSENSE"
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>
<!-- Tag Scroller -->

<DIV STYLE="overflow: auto; width: 255; height: 255; border: 0 #000000 solid; text-align: center; padding: 2px">

<IMG SRC="images/World Map.jpg">
<p><!-- Enter Your Content Here -->

</DIV>


<FORM NAME="joe">
<INPUT TYPE="text" WIDTH="200" NAME="burns" VALUE="Text For Picture One" size="60">
</FORM>

<A HREF="javascript:slideshowBack()"> Back</A>

<A HREF="javascript:slideshowUp()"> Next</A>

What i want to do is to use software that uses placeholders within the code such as !!image 1!!, !!image 2!! that will get the results from a sql table and I have the option within the database of storing the image directly or the url to the image source.

I do like the way it displays images + captions but i want to do the following to it.

Whwn it loads the images will be shown as thumbnails that will automatically fit in the window, to still have the scroll ability. But when someone clicks on the thumbnail picture a new window will open showing the image in its actual size.

I want the script with captions or without.
Can anyone help please.
Thanks
Craig
shout it is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:09 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com