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> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.