Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Quick simple question, a little complicated for me. Windows.

    Hello all, I am new to the forum and I have a couple quick questions. I need a script that upon opening a page will use the onLoad function to open another window automatically. This window should be opened within a few seconds of this page loading. But thats not the important part. It could be a clickable link on the page.

    The page that opens needs to open and then be reloaded over and over continuously. I would like the page to open, wait about 5 seconds and then reload the same page. I need it to do that 5 times and then change to a different url, and then back to the original one.

    Here is a visual example if I made it sound to complicated, I tend to do that...

    1. Open the source page...
    2. The source page opens the child page automatically or by clicking a link.
    3. The child page opens with a url of something like... www.yahoo.com
    4. Waits 5 seconds and reloads that page.
    5. Does this 5 times.
    6. Opens a new url in that window... www.msn.com.
    7. and then starts all over again, I would like it to be for a set amount of time, being able to set it for 3 or 4 hours or something would be great.

    My first idea was to do all of this in seperate windows but then it hit me that this method would probably be a lot easier to design and less of a stress on the computer.

    If anyone can offer advice on how to get my going I would really appreciate, if someone is willing to make eacxtly what I need for a small fee I could live with that, save me a bunch of headaches, I need it as soon as possible.

    Here is what I have so far. Rough I know... haha

    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    reloadtime = 5;

    function Start(URL) {
    preview = window.open(URL, "preview", windowprops);
    if (reloadtime) setTimeout("preview.reload();", reloadtime*1000);
    }

    function Pop() {
    url = "page needs to be opened five times";
    delay = 2; // time in seconds before popup opens
    timer = setTimeout("Start(url)", delay*1000);
    }
    // End -->
    </script>

    </head>

    <BODY OnLoad="Pop();">

    I got this script off the internet and have been trying to modify it to fit my needs. Thanks for the help guys I really appreciate it.
    Last edited by mb116; 01-12-2007 at 02:32 AM.

  • #2
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    do you need a payed sevice ?

    I can write a solution

    cost = 5$

    regards

    salman

    supersalman@gmail.com

  • #3
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Salmancode
    You want the Paid work offers and requests section


    Not the finished item but it should get you on your way

    PHP Code:
    <HTML>
    <
    HEAD>
    <
    TITLE>Document Title</TITLE>

    <
    script type="text/javascript">
    <!-- 


    urls=[

    "http://www.yahoo.com",
    "http://www.msn.com"

    ]

    reloadtime 5

    index
    =0
    count
    =0
    preview
    =null

    function start(){
    if(!
    preview){
    preview window.open(urls[index], "preview","left=200,top=100,width=500,height=500")
    }

    if(
    preview&&!preview.closed){
    preview.location=urls[index]

    if(
    count!=5){
    timer=setTimeout("start()"reloadTime*1000)
    }

    if(
    count==5){
    if(
    index<urls.length-1){
    index++
    }
    else{
    index=0
    }

    count=0
    preview
    .location=urls[index]
    start()
    }

    count++
    }

    }


    // -->
    </script>

    </HEAD>
    <BODY onload="start()">

    </BODY>
    </HTML> 
    Last edited by Mr J; 01-13-2007 at 09:35 AM.
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •