Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-06-2007, 03:28 AM   PM User | #1
ddanatzko
New Coder

 
Join Date: Jun 2007
Location: VA
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
ddanatzko is an unknown quantity at this point
need to obtain variable number of iFrames in a page

I have a page that is going to have x number of iFrames. document.iFrame has no properties, so I can't check the length and without knowing how many iframes there are going to be, I can't loop through the elements by ID.

Basically, what I'm trying to do, is prevent a user from clicking on a link that displays a hidden <div> until all iframes are loaded. If the link is clicked before the iframe loads, the iframe stops loading (this is only affecting IE, but my Company mandates the IE is the standard ).

Any other ideas on how to fix this would be helpful
ddanatzko is offline   Reply With Quote
Old 07-06-2007, 05:44 AM   PM User | #2
rwedge
Regular Coder

 
Join Date: Feb 2005
Posts: 679
Thanks: 0
Thanked 16 Times in 15 Posts
rwedge is on a distinguished road
You could use getElementsByTagName:
Code:
var ifm = document.getElementsByTagName('iframe');
alert(ifm.length);
rwedge is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:08 PM.


Advertisement
Log in to turn off these ads.