By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,299 Members | 1,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,299 IT Pros & Developers. It's quick & easy.

Need some advice.

P: n/a
HI! I have a script here below that I want to use in order to bet around a
small bug in Firefox.

function Firefoxautofix(x,y,){
parent.window.resizeBy(-1,-1)
parent.window.resizeBy(+1,+1)
}

I need to resize the parent window. I use iframes and there is a resize
script to auto resize to content and all work fine in IE,NS and Opera. but
there is a small problem in Firefox. I need to do like a refresh BUT not a
refresh so I want use the function above to simulate a refresh of the parent
window.

The refresh to content script is in the child pages ( pages that are in the
iframe).

Here is a link for a example.
http://www.webcandesign.com/111/index.asp

<script type="text/javascript">
function autofitIframe(id){ // v.1.0
if (!window.opera && !document.mimeType && document.all &&
document.getElementById){
parent.document.getElementById(id).style.height=th is.document.body.offsetHeight+"px";
}
else if(document.getElementById) {
parent.document.getElementById(id).style.height=th is.document.body.scrollHeight+"px"
}
}
</script>

<body onload="autofitIframe('Iframemain')">
Thanks in advance :)

Paul
Aug 27 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Please ignore this post. I made a mistake.
I have reposted with the corrections.

Paul
"Paul" <pa***********@sympatico.ca> wrote in message
news:HN******************@news20.bellglobal.com...
HI! I have a script here below that I want to use in order to bet around a
small bug in Firefox.

function Firefoxautofix(x,y,){
parent.window.resizeBy(-1,-1)
parent.window.resizeBy(+1,+1)
}

I need to resize the parent window. I use iframes and there is a resize
script to auto resize to content and all work fine in IE,NS and Opera. but
there is a small problem in Firefox. I need to do like a refresh BUT not a
refresh so I want use the function above to simulate a refresh of the
parent window.

The refresh to content script is in the child pages ( pages that are in
the iframe).

Here is a link for a example.
http://www.webcandesign.com/111/index.asp

<script type="text/javascript">
function autofitIframe(id){ // v.1.0
if (!window.opera && !document.mimeType && document.all &&
document.getElementById){
parent.document.getElementById(id).style.height=th is.document.body.offsetHeight+"px";
}
else if(document.getElementById) {
parent.document.getElementById(id).style.height=th is.document.body.scrollHeight+"px"
}
}
</script>

<body onload="autofitIframe('Iframemain')">
Thanks in advance :)

Paul

Aug 27 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.