Page 1 of 1

Posted: Tue Mar 15, 2005 1:54 am
by Joe3210
Any way to make a script to make a blank firefox or internet explorer page load up to random pages every three minutes? And what code editor are you using?

Posted: Tue Mar 15, 2005 2:11 am
by VisibilityMissing
Take a look in the <a href='http://webmonkey.wired.com/webmonkey/re ... e_library/' target='_blank'>Webmonkey Javascript Library.</a> You might find something in there.

Posted: Fri Mar 18, 2005 4:00 pm
by Archaemic
Why would you want to do that? You CAN, but...ugh, spyware memories >.o REPRESS REPRESS REPRESS.

Posted: Fri Mar 18, 2005 11:51 pm
by Richard K Niner
<!--c1--> <table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1--><html><br><head><br>  <title>Blah</title><br></head><br><body><br><script type="text/javascript"><br>// generate content iframe<br>document.body.innerHTML = document.body.innerHTML +<br>  '<iframe name="main" id="main" style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;border:none;"/>';<br><br>// Populate sites<br>var sites = Array (<br>  'http://www.ozyandmillie.org/',<br>  'http://www.idrewthis.org/',<br>  'http://definecynical.mancubus.net/forum/',<br>  'http://ireadthis.abort-retry-ignore.net/',<br>  'http://www.google.com/'<br>);<br><br>// Function to place site in iframe<br>function replaceUrl(siteUrl) {<br>  document.getElementById('main').setAttribute('src', siteUrl);<br>}<br><br>// Function to generate random url from list<br>function rand() {<br>  var x = Math.floor(Math.random() * 5);<br>  if (x > 4) x = 4;<br>  return sites[x];<br>}<br><br><br><br>// Function to run script<br>function loadNewUrl() {<br><br>  var url = rand();<br>  replaceUrl(url);<br>  setTimeout('loadNewUrl();', 180000);<br>}<br><br>loadNewUrl();<br></script><br></body><br></html><!--c2--></td></tr></table> <!--ec2--><br>The above script will match those specifications (load up a random page every 3 minutes).

Posted: Sat Mar 19, 2005 12:08 am
by Joe3210
Thank you Niner.<br><br>Looks pretty understandable for a forgetfull person like myself. Since it looks like C++, I should be able to learn how to write scripts.

Posted: Sat Mar 19, 2005 12:22 am
by Richard K Niner
Well, JavaScript <i>does</i> use C syntax ... for the most part. (BTW, <a href='http://www.ecma-international.org/publi ... MA-262.pdf' target='_blank'>here</a> is the official specification for it.)