Jump to content

changing pictures by presing a link..


minow

Recommended Posts

Hey I am building a gallery and I found a code that allows me to change a picture by pressing a link.here is the page with the code: The pagethe problem occur in Firefox explorer. when I change the pictue it goes out of the lines.i would apriciate any helpthank you dor :)here is the code again

<html><head><style type="text/css">A:link {text-decoration: none; color: white;}A:visited {text-decoration: none; color: white;}A:active {text-decoration: none; color: white;}A:hover {text-decoration: none; color: #fe0505;}img.arrow {margin-top: 4px;}img.thumb {margin-top: 5px; border:none; width: 100px; height: 100px;}td.tdthumb {background-color:none; height: 110px; width: 100px;}</style>	<style type="text/css" media="screen, projection">  body   { 	   background-image:  url('back.jpg');  background-position:   center;   }    img { border:none; }	</style><script type="text/javascript">/************************************************ Image Thumbnail Viewer II script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts* This notice must stay intact for legal use***********************************************///Specify image paths and optional link (set link to "" for no link):var dynimages=new Array()dynimages[0]=["photo1.jpg", "http://www.cnn.com"]dynimages[1]=["images/1.jpg", "http://www.yahoo.com"]dynimages[2]=["images/2.jpg", "http://www.google.com"]dynimages[3]=["images/3.jpg", "http://www.google.com"]dynimages[4]=["images/4.jpg", "http://www.google.com"]dynimages[5]=["images/5.jpg", "http://www.google.com"]dynimages[6]=["images/6.jpg", "http://www.google.com"]dynimages[7]=["images/7.jpg", "http://www.google.com"]dynimages[8]=["images/8.jpg", "http://www.google.com"]//Preload images ("yes" or "no"):var preloadimg="no"//Set optional link target to be added to all images with a link:var optlinktarget=""//Set image border widthvar imgborderwidth=0//Optionally, change 1.0 and 0.7 below to affect Wipe gradient size and duration in seconds in IE5.5+:var filterstring="progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)"///////No need to edit beyond here/////if (preloadimg=="yes"){for (x=0; x<dynimages.length; x++){var myimage=new Image()myimage.src=dynimages[x][0]}}function returnimgcode(theimg){var imghtml=""if (theimg[1]!="")imghtml='<table align="center"><tr><td align="center"><a href="'+theimg[1]+'" target="'+optlinktarget+'">'imghtml+='<img src="'+theimg[0]+'" border="'+imgborderwidth+'">'if (theimg[1]!="")imghtml+='</a></td></tr></table>'return imghtml}function modifyimage(loadarea, imgindex){if (document.getElementById){var imgobj=document.getElementById(loadarea)if (imgobj.filters && window.createPopup){imgobj.style.filter=filterstring}imgobj.innerHTML=returnimgcode(dynimages[imgindex])if (imgobj.filters && window.createPopup)imgobj.filters[0].Play()return false}}</script></head><body><table align="center" bordercolor="#696969" width="700" height="500" border="1" cellpadding="0" cellspacing="0"><tr>	<td width="500" height="500" rowspan="6" align="center"><div id="dynloadarea2" align="center" style="width:400px;height:400px"><img src="images/1.JPG" border="0"></div>  </td>	<td colspan="2" height="20">9  </td></tr><tr>	<td class="tdthumb"><a href="#" onClick="return modifyimage('dynloadarea2', 1)"><img src="images/1.JPG" class="thumb"></a>  </td>	<td class="tdthumb"><a href="#" onClick="return modifyimage('dynloadarea2', 2)"><img src="images/2.JPG" class="thumb"></a>  </td></tr><tr>	<td class="tdthumb"> <a href="#" onClick="return modifyimage('dynloadarea2', 3)"><img src="images/3.JPG" class="thumb"></a>  </td>	<td class="tdthumb"><a href="#" onClick="return modifyimage('dynloadarea2', 4)"><img src="images/4.JPG" class="thumb"></a>  </td></tr><tr>	<td class="tdthumb"><a href="#" onClick="return modifyimage('dynloadarea2', 5)"><img src="images/5.JPG" class="thumb"></a>  </td>	<td class="tdthumb"><a href="#" onClick="return modifyimage('dynloadarea2', 6)"><img src="images/6.JPG" class="thumb"></a>  </td></tr><tr>	<td class="tdthumb"><a href="#" onClick="return modifyimage('dynloadarea2', 7)"><img src="images/7.JPG" class="thumb"></a>  </td>	<td class="tdthumb"><a href="#" onClick="return modifyimage('dynloadarea2', 8)"><img src="images/8.JPG" class="thumb"></a>  </td></tr><tr>	<td colspan="2" height="10">  <table border="0" align="center">   <tr>    <td> 	 <img src="back2.gif" class="arrow">    </td>    <td><a href="">1</a>  <a href="">2</a>  <a href="">3</a>  <font color="orange">></font><font color="orange"> 4 </font><font color="orange"><</font>  <a href="">5</a>  <a href="">6</a>  <a href="">7</a>    </td>    <td><img src="for2.gif" class="arrow">    </td>   </tr>  </table>  </td></tr></table><BR><BR><BR><BR><BR><BR><BR></body></html>

Link to comment
Share on other sites

the problem occur in Firefox explorer. when I change the pictue it goes out of the lines.
What exactly is Firefox explorer? There's Internet Explorer, and there's Firefox. Is it one of those (Help -> About should tell you what you're using)?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...