View Full Version : Open urls sequencially
08-27-2010, 01:32 PM
How I open urls sequencially - one by time -, but automatically (each 5 seconds) from a list with dozens of URLs in the same iFRAME?
I have what i think it is a simple question to answer.
I have a button to open a new link in a iframe (in the same browser window). And what i need is that after i press the button, the link opened would come from a list of html sequencially.
I dont want that the html opened would be from a random choice, but i want to be sequential.
I hope that i'm being clear in my line of thought. Is this possible?
08-27-2010, 08:39 PM
??? First you said
automatically (each 5 seconds) from a list
and then you said
i press the button, the link opened would come from a list
So which is it???
Automatic? Or only when the button is pressed?
And what happens when you get to the end of the list? Do you go back to the top or say "no more links"???
08-27-2010, 08:50 PM
I have "similar" thing using a HTA file, but I need press the button every time.
At the end of the lins list it will stop simply.
08-27-2010, 09:05 PM
You could load the URLs into a frame, yes. But then your JS code could not possibly "read" the contents of the other frame.
Cross-domain scripting is not allowed.
08-28-2010, 01:49 AM
Well, well, well, the first step is done. I would need now a bit help to reset the textarea contents evey time that change the text placed on it.
I am trying the following:
08-28-2010, 01:59 AM
Sorry, don't understand.
Looks to me like onchange would be what you want, but why do you want to ONLY set the value of 'fred' to blank and nothing more?
08-28-2010, 02:14 AM
"fred" is the id of the textarea. No forms. It works fine no forms.
The web page is placed on the iframe and automatically the source code is shown inside the textarea. No problems. I have the script to strip out the source code! My problem is "reset" the "source code" before a new page is placed on the textarea. Press the button? No. Any pressed button.
08-28-2010, 02:24 AM
Why not use the same button that you press to *get* the next URL to clear the textarea?
Or if you are using a timer, just have it clear the textarea at the same time it starts the reload of the <iframe>.
Not clear to me why you need the textarea if you have the <iframe>, but never mind.
08-28-2010, 02:50 AM
Following your advice I found the exact position in the script to put the command line to reset the textarea.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.