Jump to content

image problem


anushka

Recommended Posts

i have home page i should add image and thet image should should change at particular time

and there will be a button  changeonclick on that button image should change

i think u all got it what is my problem

i wrote  code,but  i am not able to read the  main image 

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

<html ><head>

<title></title>

<link href="/utility/main.css" type="text/css" rel="STYLESHEET">

</head>

<body>

<script language="JavaScript" type="text/javascript"><!--

var number = window.location.search.substring(1) - 0;

 

document.write('<IMG SRC="images1' + number + '.jpg" WIDTH=400 HEIGHT=300><P>');

 

 

if (number == 1) document.write('<IMG SRC="/images1/on.gif" WIDTH=35 HEIGHT=35>');

else document.write('<A HREF="slides.htm?1"><IMG SRC="/images1/off.gif" WIDTH=35 HEIGHT=35 BORDER=0><\/A>');

if (number == 2) document.write('<IMG SRC="/images1/on.gif" WIDTH=35 HEIGHT=35>');

else document.write('<A HREF="slides.htm?2"><IMG SRC="/images1/off.gif" WIDTH=35 HEIGHT=35 BORDER=0><\/A>');

if (number == 3) document.write('<IMG SRC="/images1/on.gif" WIDTH=35 HEIGHT=35>');

else document.write('<A HREF="slides.htm?3"><IMG SRC="/images1/off.gif" WIDTH=35 HEIGHT=35 BORDER=0><\/A>');

if (number == 4) document.write('<IMG SRC="/images1/on.gif" WIDTH=35 HEIGHT=35>');

else document.write('<A HREF="slides.htm?4"><IMG SRC="/images1/off.gif" WIDTH=35 HEIGHT=35 BORDER=0><\/A>');

if (number == 5) document.write('<IMG SRC="/images1/on.gif" WIDTH=35 HEIGHT=35>');

else document.write('<A HREF="slides.htm?5"><IMG SRC="/images1/off.gif" WIDTH=35 HEIGHT=35 BORDER=0><\/A>');

 

if ((number >= 1) && (number < 5))

    document.write('<IMG SRC="/images1' + (number + 1) + '.jpg" WIDTH=1 HEIGHT=1>');

//--></script>

</body>

</html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.