Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old July 13th, 2004, 09:35 AM
nilzp nilzp is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 8 nilzp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Java Help Timer

i need a page with a java script that opens a link in an iframe accoding to how long the script has been loaded.

for example a user comes to the page .. 2 seconds later the iframe changes pages .. and then another 2 seconeds later it chanegs to another page.

can you give me a sample code for this .. any thing that whould help

Reply With Quote
  #2  
Old July 13th, 2004, 09:33 PM
brut brut is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 367 brut User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 30 sec
Reputation Power: 2
RE: Java Help Timer

This isn't the prettiest, but works.
php Code:
Original - php Code
  1.  
  2. <?php
  3. ?>
  4.  
  5. <html>
  6. <head>
  7.  <title></title>
  8.  <script langguage="javascript">
  9. <!--
  10.      var pages=new Array("a.html",
  11.                          "b.html",
  12.                          "c.html");
  13.      var i=0;
  14.      function startrotation(){
  15.          if(i==pages.length){
  16.              i=0;
  17.          }
  18.          top.iframe1.location=pages[i];
  19.          i++;
  20.          setTimeout("startrotation()",2000)
  21.      }
  22. //-->
  23.  </script>
  24. </head>
  25. <body onload="setTimeout('startrotation()',2000);">
  26.  <IFRAME NAME="iframe1" SRC="">
  27. </body>
  28. </html>
  29.  
  30. <?php
  31. ?>


[edit]Ignore the php tags. the code tag here loses all formatting.[/edit]

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Java Help Timer


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT