Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    <object id="idName">

    hi.

    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:
    <head>
    <script>
    <!--
    //sets focus on the flash movie
    function focusFlash()
    {
    document.all.idName.setFocus();
    }

    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.

    thanks.

    fumeng.
    -->
    </script>
    </head>

  • #2
    Regular Coder
    Join Date
    Jul 2004
    Location
    mile high city
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by fumeng
    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.
    Computer, kill Flanders... Did I hear my name? My ears are burning...
    Good start. Now finish the job.

  • #3
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?

    thanks.

    fumeng.

  • #4
    Regular Coder
    Join Date
    Jul 2004
    Location
    mile high city
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No problem.

    Can't help with the rest of your question though...
    Computer, kill Flanders... Did I hear my name? My ears are burning...
    Good start. Now finish the job.

  • #5
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    no worries. thanks again for your help.

    best,

    fumeng.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •