...

View Full Version : OnFocus - works in IE not in Firefox :(



recchi_8
11-04-2004, 01:24 AM
anyone have any idea why this code doesn't work in firefox?

<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="75%"><IFRAME name="body" onFocus="alert('test me');" src="http://www.yahoo.com" width="100%" height="400" style="border: 1px solid #000000"> </IFRAME></td>
</tr>
</table>

I'm just trying to cue a javascript event (onFocus). It works in IE when you click on the iframe, but in firefox.. nothing. Am I missing something?
thanks all!

Kor
11-04-2004, 10:32 AM
"This [onfocus] attribute may be used with the following elements: A, AREA,
LABEL, INPUT, SELECT, TEXTAREA, and BUTTON."
http://www.w3.org/TR/html401/interact/scripts.html#adef-onfocus

So, Mozilla does not have to support onfocus for iframe.

Same thing with Opera 7.x's

"Show Active frame border setting (Preferences.../Page Style): When you view framed pages, the currently active frame will always be outlined."



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum