Stephen said:
Giggle said:
Is there a way to use Javascript to detect if a browser supports
IFrames, or (if it DOES support them) that IFrame use is enabled?
[...]
Signatures are not to be quoted unless explicitly referred to.
I can't guarantee this universally, but you could try something like:
<iframe src='mypage.htm'>
<script type='text/javascript'>
var ifSupport=false;
</script>
</iframe>
<script type='text/javascript'>
// must be placed below iframe tags or
// called as onload code.
if( typeof ifSupport != 'undefined' )
// iframes supported
else
// alert or redirect etc
</script>
That is essentially the same as
<iframe src='mypage.htm'>
<script type='text/javascript'>
var ifSupport=false;
// iframes supported
</script>
</iframe>
<script type='text/javascript'>
// iframes not supported
if (typeof ifSupport == 'undefined')
{
// alert or redirect etc
}
</script>
Yet it will still not work without client-side script support.
Signatures must be delimited with a line containing
(in words, not literally) MinusMinus_Space_Newline.
PointedEars