#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    23
    Rep Power
    0

    Transfer variables to an iframe array... please help


    I have 6 different forms on one page, each with 450 checkboxes.

    I need to pass these form variables from the parent page through to it's iframe page.

    I need the iframe page to create an array from any and all checkboxes that are NOT checked off.

    I've been searching online for days now and am thinking this might not be possible.

    I REALLY want to do this so hopefully there is a way.
    Thanks in advance.
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    Is the iframe on the same domain as the parent page?
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    23
    Rep Power
    0
    Originally Posted by E-Oreo
    Is the iframe on the same domain as the parent page?
    Yes it is.
  6. #4
  7. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    Good, it should be possible then. So your checkboxes are on the parent page and your JavaScript is on the iframe'd page?

    Using jQuery something like the following should work:
    Code:
    $("input:checkbox:not(:checked)", window.parent.document)
    This should return an array of the unchecked boxes.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    23
    Rep Power
    0
    Originally Posted by E-Oreo
    Good, it should be possible then. So your checkboxes are on the parent page and your JavaScript is on the iframe'd page?

    Using jQuery something like the following should work:
    Code:
    $("input:checkbox:not(:checked)", window.parent.document)
    This should return an array of the unchecked boxes.
    Thanks, looks promising. But with my crapity coding skills, I'm not all too familiar with jQuery, so I'm not sure where this code goes and how I can access and display it's array.

    I'll play araound with it, but if there is anything more you could help me out with regarding my problem, that would be so much appreciated.

IMN logo majestic logo threadwatch logo seochat tools logo