Loading ...
Sorry, an error occurred while loading the content.

6990Re: [phpXperts] Need urgent help about php and java script

Expand Messages
  • Raina Rahman
    Jul 31, 2007
    • 0 Attachment
      Thank you arafat. Still i'm having problem. As I'm ot expert in java script. Could ou please send me the full script? that will very easy for me. thanks

      On 7/31/07, Arafat Rahman <opurahman@...> wrote:

      Hi Raina,
       
      Create an array in javascript.
      like this
       
      arr_img[0] = "<img src='images/img0.jpg' border='0' />";
      arr_img[1] = "<img src='images/img1.jpg' border='0' />";
      arr_img[2] = "<img src='images/img2.jpg' border='0' />";
      ......
       
      Place your image in a div. like this.
      <div id="img_div"><img src="images/img0.jpg" border="0" /></div>
       
      create a counter variable and a function like this.
       
      var count = 0;
      var t = 0;
       
      function setImg() {
      document.getElementById("img_div").innerHTML = arr_img[count];
      count++;
      t = setTimeOut( "setImg()", 15000);
      }
       
      Hope this will help you.
       
      --
      Arafat Rahman
      Web Programmer @ Bangladeshinfo.com
      Sun Certified Programmer for Java
      B.Ed . (Hons), M.Ed.
      URL: http://arafat.wordpress.com

       
      On 7/30/07, Raina Rahman <rainarahman@... > wrote:
      Dear All,
       
      I'm developing a web site. The problem is there will be a image section. The image will appear with details from database one by one after 15 sec later. When i'll visit first time in the web site i will see the last picture with its description. After 15 sec that image will change and will appear another picture from database within the same place.
       
      Hope you gys understand what I want.
       
      I tried with java script settimeout() function. but failed. May be i'm trying in proper way. Please you guys help me.
       
      Raina


    • Show all 5 messages in this topic