View Full Version : Someone help ?

08-10-2005, 01:38 AM
Ok this is what I am trying to do. If you would kindly take a look at this page:


the images are controlled by little links on the bottom. I am trying to achieve this through some scripting. I think I may have something. (I am by no means a coder myself, I just like to tinker and mess around). This is the code I have.

Can someone who is good at this tell me how I can change/add my code to get the effect I am looking for ???

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


<script language="JavaScript1.2" type="text/javascript">
var current = 1

function loadintoIframe(iframeid, url){
if (document.getElementById)

function nextpage()
if (current >=6) {
current = 1
} else {
current = current + 1;

function prevpage()
if (current <=1) {
current = 6
} else {
current = current - 1;



<body bgcolor="#FF9F40" leftmargin=0 topmargin=0>

<table width="660" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="White">
<tr valign="top">
<td valign="top" align="center">
<iframe src="1.html" name="headerpic" id="headerpic" width="660" height="290" marginwidth="0" marginheight="0" align="middle" scrolling="no" frameborder="0"></iframe>
<td align="center">
<img src="leftarrow.gif" onclick='prevpage()' value='PREVIOUS' javascript:loadintoIframe('headerpic')>
<img src="rightarrow.gif" onclick='nextpage()' value='NEXT' javascript:loadintoIframe('headerpic')>




I know what I have there is probally totally wrong. But I am trying...



08-10-2005, 08:25 AM
Use Flash and save yourslef some coding time. If you don't know how to use flash, you can use some of Gallery codes from these site. Here are some links:





If you search a little more you ll find more for sure.

08-10-2005, 09:01 AM
You don't need to use Flash for this.

<script type="text/javascript">
var images = new Array("imageone.jpg", "imagetwo.jpg", "imagethree.jpg");
var titles = new Array("First picture", "Second picture", "Third picture");
var currImg = 0;

function nextImage(img, txt) {
if(currImg == images.length) currImg = 0;
img.src = images[currimg];
txt.innerHTML = titles[currimg];

function lastImage(img, txt) {
if(currImg == -1) currImg = images.length;
img.src = images[currimg];
txt.innerHTML = titles[currimg];
<img id="theImg" src="imageone.jpg"/><br/>
<p id="theTxt">First image</p>
<a href="listOfImages.htm" onclick="lastImage(document.getElementById('theImg'), document.getElementById('theTxt'));return false;">Previous</a>
<a href="listOfImages.htm" onclick="nextImage(document.getElementById('theImg'), document.getElementById('theTxt'));return false;">Next</a>

08-10-2005, 05:46 PM
Ok lol, you can do everything in java (EDIT/ javascript :rolleyes: )

Anyways it would look better in flash.

08-10-2005, 05:55 PM
DHTML really is rather powerful - if you take the time and don't mind writing massive amounts of code. Check out the DHTML Lemmings (

It wouldn't necessarily look better in Flash - depends what effects you applied. It could look purty in DHTML, too - add some fading/scrolling effects, make the buttons look good...

in java
-.- (points to the sig)