JSFiddle - React, Tailwind, and code Playground

by rjurd

HTML

<iframe id='frUpload' src='http://www.smh.com.au'>
browser doesn't support iframe
</iframe>
<input type='button' id='btnClick' value='click me' />

JavaScript

function openFileUpload() {

    var frame = document.getElementById('frUpload');
    $(frame).focus();
    $(frame).contents().find("#fUpload").click();

    var value = $(frame).contents().find("#fUpload").val();
    if (value != '') {

        // this is where I need to use .bind()
        $(frame).contents().find("#btnFLSubmit").click();
    }
}

$(function() {
    $('#btnClick').click(function() {
        $('#frUpload').contents().find('.nN-footerLinks').each(function(i, em) {
            alert(em.innerHTML);
        });
    });
});