Results 1 to 2 of 2

Thread: Filtering children object from parent

Hybrid View

  1. #1
    Join Date
    Dec 2010

    Cool Filtering children object from parent

    Hi mates,

    As I'm newbie integrating PHP-HTML-JS I'd need some help for doing the following:

    I have a index.php including:

    <script type="text/javascript">
    function filter (phrase, _id){
    var words = phrase.value.toLowerCase().split(" ");
    var table = document.getElementById(_id);
    var ele;
    for (var r = 1; r < table.rows.length; r++){
    ele = table.rows[r].innerHTML.replace(/<[^>]+>/g,"");
    var displayStyle = 'none';
    for (var i = 0; i < words.length; i++) {
    if (ele.toLowerCase().indexOf(words[i])>=0)
    displayStyle = '';
    else {
    displayStyle = 'none';
    table.rows[r].style.display = displayStyle;

    <div id="filter">
    <input name="filt" onkeyup="filter(this, 'LIST', '1')" type="text">

    <div id='iframe01'> <iframe src='child.php' name='iframe01'></iframe>

    and a child.php including a table object with the id LIST.

    I'd need to change the parent.php in order to filter on real-time the table LIST via the FILT input on the parent form. I have tried different values instead of 'this' on the js function calling but nothing succesfully. żAny ideas?
    Thanks so much

  2. #2
    Join Date
    Dec 2004
    Kansas City, Missouri
    I don't know if you can access the DOM of a document displaying through an iframe window.
    This returns false on a document that I created with an iframe.
    We're Tiny,
    We're Toony,
    We're all a little loony.
    The scripts were rejected;
    Expect the Unexpected.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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