Will an alert box stop everything loading until the ok box is clicked? If it does, that is what I need. What would be a simple code for putting an alert box, just to delay the page ? Can it go anywhere in the html code, or does it have to be before head, body, etc? Thanks!
@UltimaterApr 20.2005 — #LOL... True, an alert dialog box does entirely stop the page, but once the alert is clicked, the script continues where it left-off as though the alert had never happened.
If you are trying to fire a function after the page's elements are written, you can use the [color=royalblue]onload[/color] function.
If you want to display a loading layer on-top-of the whole page's contents and hide the layer after the page finishes loading, then you can use this: [code=html] <div style="position: absolute; top:0px; left:0px; z-index: 9999; display: inline; background-color: buttonface; height:9999px; width:9999px;" id="loader"> Loading </div> ...MORE... ...HTML... ...GOES... ...HERE... <script type="text/javascript"> setTimeout('document.getElementById("loader").style.display="none"',100) </script> [/code]
@UltimaterApr 20.2005 — #That looks like it will do it. If that doesn't do it, you can always make the alert pop-up on the parent-side like: <i> </i>if (parent.score >= 100) { parent.window.alert("Click on to continue surfing"); }
@stc60authorMay 11.2005 — #I actually never did get it to work.
Maybe the javascript was too mixed up with php.
There probably is a php line of code that would work.
Here is what I did:
1)Put an alert box to start surfing, so page could not be reloaded without a click.
2)Put an alert box (IE compatible only) that alerts the surfer to a framebreaker.
3)Increased the autosurfing timer by 2 seconds. You may add more.
4)Put an onunload tag (again IE compatible only) which brings the site focus back to the surfing page. Which means every pageload brings the site to be on top of other sites if surfing multiple pages. (Can only be minimized for 15 seconds)
If you use 4daily.com, you know what this is like.
As for bandwidth, autosurfing really does not use much.
Since any graphics are cached, and you are only calling a few lines of code each time.
I pay $19/month for 20GBs and it is plenty for now. I get anywhere between
@UltimaterMay 11.2005 — #Couldn't a user with JavaScript disabled avoid all of your alerts and thus remain surfing as long as they want or even use a bookmark like the following:
Here is my Surfbar.php Script, Now plz tell me where to add the exact code that my surfbar will stop automatically and members gets an alter box and they must leave the suef page after any member visit/surfed 100 sites
This time scripts works correct but you can make some alteration in it to stop surfbar after 100 sites
Start PHP
Please check attached file surfbar.zip. I tried to post script here but it was too long so I attached it, Please help me asap