javascript - How can I resize a modal iframe when a new page loads in it? -


i have several linked pages want display in modal iframe. pages not same size , want able resize iframe when each new page loaded. have looked @ several jquery plugins create iframe, can't figure out how resize of them. experimenting prettyphoto , nyromodal, open suggestions. need make work. not javascript, trying learn.

note: pages on web server, there no issue cross domain.

thanks quick responses. i'm headed bed forward trying out suggestions when wake up.

try putting in iframe:

document.onload = function() {     var = parent.document.getelementbyid('myiframe');     i.style.width = document.body.offsetwidth+"px";     i.style.height = document.body.offsetheight+"px"; } 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -