anushka Posted October 5, 2008 Share Posted October 5, 2008 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 https://forums.phpfreaks.com/topic/127117-image-problem/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.