Results 1 to 4 of 4

Thread: getting elements in iframe with jquery

  1. #1
    Join Date
    Jun 2008
    Posts
    192
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Default getting elements in iframe with jquery

    Hello,

    Can anyone tell me how to find an element inside an iframe using jquery?

    I've seen examples on the web but nothing works. I've seen:

    var iframe = $("iframe"); var elm = $("#elementID", iframe.contents());

    var elm = $("#iframeID").contents().find("#elementID");

    But these don't help.

  2. #2
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

  3. #3
    Join Date
    Jun 2008
    Posts
    192
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Default

    Unfortunately, that does not help.

    Does it matter if the element I want is an input element (type="button") buried way deep inside a table cell?

  4. #4
    Join Date
    Jun 2008
    Posts
    192
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Default

    Solved it.

    The link you provided is correct. It's just that the element I was trying to get wasn't loaded yet. I placed to code in a spot after I was sure the iframe content was loaded and it worked.

Similar Threads

  1. Replies: 3
    Last Post: 03-17-2014, 03:42 PM
  2. Replies: 4
    Last Post: 08-26-2012, 02:21 PM
  3. Overlapping jQuery elements
    By fingersoccer in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 11-11-2010, 04:08 PM
  4. How to make elements disappear with jQuery
    By sethwb in forum JavaScript
    Replies: 0
    Last Post: 04-22-2009, 07:17 AM
  5. Menu over IFrame not working with form elements
    By progresst in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 06-14-2007, 10:50 PM

Bookmarks

Posting Permissions

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