Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Browsers / Internet Explorer / July 2004



Tip: Looking for answers? Try searching our database.

onload event not valid for IFRAME ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TR - 12 Jun 2004 02:15 GMT
For some reason unknown to me, my aspx page in VS2003 does not
recognize 'onload' as a valid event for IFRAME. "onload" does not
appear in the context-popup and it gets underlined with squiggly
red in the designer when I try to do this:

<IFRAME id='abc' name='xyz' onload='myHandler()'>
</IFRAME>

I have tried changing the DOCTYPE to 4.01 Frameset but to no
avail. Suggestions gratefully received!
TR
Csaba Gabor - 29 Jul 2004 17:29 GMT
What about putting the onLoad into the <BODY...> element
of whatever gets loaded:
<BODY onLoad='myHandler()'>...</BODY> or
<BODY onLoad="alert(\"I'm rich.  I mean I'm loaded\")"></BODY>
and include a src attribute in your <IFRAME>?

Or, if you insist on not having a separate document, you could do:
<IFRAME src="javascript:document.write(
 &quot;
   <BODY onLoad='frameInit()'>
     Hi Mom
     <SCRIPT type='text/javascript'>
       function frameInit() {
         var sq='\\&#39;';
         alert('I'+sq+'m rich.  I'+sq+'m loaded.');
       }
     </SCRIPT>
   </BODY>
 &quot;);
 document.close();">
Shouldn't be displayed
</IFRAME>

Csaba Gabor
(leading spaces/CR inserted for clarity and to prevent wrapping)

> For some reason unknown to me, my aspx page in VS2003 does not
> recognize 'onload' as a valid event for IFRAME. "onload" does not
[quoted text clipped - 7 lines]
> avail. Suggestions gratefully received!
> TR
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.