HTML is pretty simple, on my page I have
<div id="notificationDialog" title="View Notification"></div>
I dynamically load notifications based on the user viewing the page and display them inside the iframe, which is inside the jQuery ui dialog box. Basically,
function viewNotif(nid) { var wWidth = jQuery(window).width(); var dWidth = wWidth * 0.5; var $notifIframe = jQuery('<iframe />', { name: 'myFrame', id: 'myFrame', src: "/modals/modal_notification.php?nid="+nid, width:"100%", height:"100%", align:"center", scrolling:"auto", frameborder:"0" }); jQuery('#notificationDialog').html($notifIframe.clone()); jQuery('#notificationDialog').dialog({ autoOpen: false, height: auto, width: dWidth, modal: true }); jQuery('#notificationDialog').dialog('open'); }
I am trying to access the div height value inside the iframe inside the jQuery ui dialog box and still have not been able to do this. How can I get the div height value, id of the div is the message_container which is inside the iframe, inside the Dialog notification?
EDIT - I should mention that the function is called in onClick on the page and passes the notification identifier (nid) for display to the function.
source share