Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

iFrame_id 1

Status
Not open for further replies.

jliz2803

IS-IT--Management
Mar 21, 2005
45
CA
With help from you I recently put this statement in for a stop method.
if (document.all) {
document.getElementById("iframe_id").document.execcommand("stop");
} else {
window.stop();
}
My next question, as I always seem to have one, is what should be in place of iFrame_id The statement works to stop the page but then I get an error telling me that iFrame_id is undefined.
 
In the example you have shown, iframe_id is the id that you have given the frame (in the html) that you want to stop.

Cheers,
Jeff


[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
I never defined a frame I am trying to stop the web page from loading if a certain condition is satisfied. Is there something I can put in place of the iFrame_id?
 
SOrry I got it fixed now it is telling me that stop is undefined??
 
And so the cycle continues... thread216-1122711

The statement works to stop the page

You post implies that you got it working. This is obviously not the case. So why did you abandon the original thread?

As I said in that post... you can't get a solution that will work in all browser/platforms. Maybe you could look at your problem from a different angle and refactor your code so that there is no longer a requirement to use such a command.

I remember when I first started programming in BASIC and learning about the GOTO command. It was a life-saver! What a great command!!! Then I learned about procedural programming and quickly realised how hollow GOTO really is. It lures you into sloppy programming and ill-thought-out designs.

Cheers,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top