![]() |
|
|
#1
|
||||
|
||||
|
Change div's after 10 seconds?
Hi,
Is it possible to change a div's after 10 seconds? For example: Display a banner for 10 seconds before loading the content and after 10 seconds hide banner and show content at the same place. |
|
#2
|
||||
|
||||
|
That would be done with javascript. However, if the visitor has javascript turned off the ad (or the content, depending on how you've set it up) won't be served.
You could use an interstitial page with the ad and redirect the visitor to the content after 10 seconds, which is a quite common albeit annoying practice. |
|
#3
|
||||
|
||||
|
You could use iframe with meta tag refresh to a script.
Peace,
__________________
Testing 1.. Testing 1..2.. Testing 1..2..3.. |
|
#4
|
||||
|
||||
|
Do you refresh your page in every 10secs??
- if you do, it can be done in php itself, with a <meta refresh=10> tag. other method. This can be done with Ajax. only a target div container refreshes in 10 every 10 secs.
__________________
Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning. |
|
#5
|
|||
|
|||
|
The javascript code to invoke a function after 10 seconds is:
setTimeout( function() { /* update div code here */ }, 10000); To get that to run when the page loads do: <script type="text/javascript"> window.onload = setTimeout( function() { /* update div code here */ }, 10000); </script> |
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Positioning Div's | gbabula | HTML & Website Design | 3 | Nov 8th 2007 7:37 pm |
| Some pixels between div's in IE? | 123GoToAndPlay | CSS | 4 | Sep 1st 2007 11:37 pm |
| div's in innerHTML | gabs | JavaScript | 2 | Mar 7th 2007 3:38 am |
| Div's in IE and FF | lizzie87 | HTML & Website Design | 1 | Jun 12th 2006 7:34 am |
| Massive weight change between two recalculations in 10 seconds | kodeking | Weight Questions | 1 | Dec 10th 2005 5:59 am |