View Full Version : <object id="idName">

03-21-2005, 02:59 PM

i'm assigning an "id" attribute in my object tag via:

<object id="idName">

it's for an embedded flash movie. on my cfm page i have this code:
//sets focus on the flash movie
function focusFlash()

and then in the body tag i invoke this function:
<body onLoad="focusFlash();">

but i'm getting an error in IE that says:
"Object doesn't support this property or method"

i can see that the "id" tag is supported on the w3cschools.com site. so where might the error message be coming from ?

any ideas? all help is greatly appreciated.



03-21-2005, 03:54 PM
Object doesn't support this property or method

Shouldn't be a problem with the <object> id. From the error message, it appears <object> does not support the focus method.

03-21-2005, 04:03 PM
hi :: thanks for responding to my post so quickly, i really appreciate that. you're exactly right, i was calling setFocus(), which is a native flash method, instead of the correct javascript method, focus(). so now it works perfectly. thank you very much for your help.

by the way, do you know about setting focus to a flash movie in mozilla-based browsers? this is essentially what i'm trying to do in this exercise. i don't use an object tag, rather an <embed> tag. but i use the "name" attribute instead of "id" and i set "swLiveConnect=true". this is all from what i've read, but it still isn't working. do i need to change my focusFlash() method?



03-21-2005, 04:12 PM
:thumbsup: No problem.

Can't help with the rest of your question though... :)

03-21-2005, 04:14 PM
no worries. thanks again for your help.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum