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 6 of 6
  1. #1
    Regular Coder
    Join Date
    Apr 2003
    Location
    Northern California
    Posts
    169
    Thanks
    0
    Thanked 0 Times in 0 Posts

    iframe reference

    how can I reference the images in side a frame? I tried this but just got an error:

    parent.mainIndex.images.length

    For some reason it does not return a value?

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Location
    Louisiana
    Posts
    576
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what does it return, if it returns "NULL" then you are using the wrong notation is mainIndex the name of your frame? try this
    test = parent.frames["mainIndex"].images.length;
    alert(test);

  • #3
    Regular Coder
    Join Date
    Apr 2003
    Location
    Northern California
    Posts
    169
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That dosent seem to work either I just need a way to reference the images int the frame so i can apply focus or hilite!! Take a look!!

    http://209.210.25.172/temp_007/Default.html

  • #4
    Regular Coder
    Join Date
    Sep 2002
    Location
    self.location
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    top.mainIndex.document.images.length = 24

    ...

    btw, your markup also has some typos. Here's an example:

    <center><iframe name="mainIndex" src="thumb.html" width="400" height="50"frameborder="0" scrolling="no"></iframe><?center>

  • #5
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    use document not parent

  • #6
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    document.mainindex.document.images.length


  •  

    Posting Permissions

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