Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24

Thread: Switching between plugin and flash

  1. #21
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    So it works good now? Thats great!
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  2. #22
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,373
    Thanks
    77
    Thanked 3,421 Times in 3,382 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by corbo950 View Post
    I found the answer .... thanks to everybody who tried to help.... using that firebug error i was able to find another forum where somebody had asked a similar question. it turns out that firefox doesnt like calling frames by their id... so you have to do this:

    Code:
    window.frames[0].loadP3D(source);
    Yes, that's the best way. If you call an iframe by its id in Firefox and most browsers you can access its src and other attributes of it as an element on the page. But if you want to access its properties as a window, like location, or its contained document, anything that relates to it as a window, you need to reference it as a frame. It's frames[#] is the best way to do that. Another alternative to do so is by name, ex:

    HTML Code:
    <iframe name="whatever" . . .
    Code:
    window.frames.whatever.loadP3d(source);
    But that isn't as reliable as by its number because the name has to be unique, whereas the number (which relates to which frame starting at 0 that it is on the page/in the window), will always be unique.

    An additional issue with names is that sometimes they can be confused with other things (like variables, functions, classes, or id's) in the document or window. And even when they are not, may not work anyway. So, when accessing the iframe as a window, the number is almost always the way to go.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #23
    Join Date
    Apr 2010
    Posts
    32
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by corbo950 View Post
    window.frames.pandaFrame.loadP3D(source);
    That was the way that i was referencing it that wasn't working in firefox. Doesn't matter now though this works. Thanks for all your help both of you

  4. #24
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,373
    Thanks
    77
    Thanked 3,421 Times in 3,382 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by corbo950 View Post
    That was the way that i was referencing it that wasn't working in firefox. Doesn't matter now though this works. Thanks for all your help both of you
    Well not exactly, you have:

    Code:
            	<iframe id="pandaFrame"  
    				frameborder="0"  vspace="0"  hspace="0"  marginwidth="0"  
    				marginheight="0" width="680"  scrolling="no"  height="480"
    				src="p3dwrapper.html">
    			</iframe>
    for:

    Code:
    window.frames.pandaFrame
    to have any chance of working, it needs to be the name of the frame:

    Code:
            	<iframe name="pandaFrame"  
    				frameborder="0"  vspace="0"  hspace="0"  marginwidth="0"  
    				marginheight="0" width="680"  scrolling="no"  height="480"
    				src="p3dwrapper.html">
    			</iframe>
    But as you see, the number works. And as I say, the number is the best method. Sometimes it isn't possible to use the number though.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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