JQuery window.parent close effect from iFrame
The following code loaded in an iFrame should alter the contents of a div on the parent page. It doesn't.
var closer = $('#cont开发者_Python百科complete').html();
window.parent.jQuery('#contprintframe').html(closer);
Any ideas?
EDIT :: This is also not working
var closer = $('#contcomplete').html();
$('#contprintframe', window.parent).html(closer);
You will have to 'find' the element you want to change in your parent first, then pass the value.
var closer = $('#contcomplete').html();
$('#contprintframe', window.parent.document).contents().find('#div_you_want_to_change').html(closer);
Hope it works.
精彩评论