I'm trying to access a thickbox iframe parent's element, I found similar questions but none of solutions is working for me. Here's the code of parent window:
<input type="text" id="mname" value="" name="mname" class="form-control" length="30" size="15" required>
and here's iframe code:
<script type="text/javascript">
$(document).ready(function () {
$("#mname", top.document).attr("value", "test");//Not working
$("#mname", parent.window.document).attr("value", "test");//Not working
$('#mname', top.document).val('Test');//Not working
$('#mname', parent.document.body).attr("value", "s");//Not working
window.parent.$("#mname").attr("test");//Not working
alert(":(");
parent.tb_remove();
});
</script>
What's the problem?
Try with :