Results 1 to 8 of 8

Thread: Double java error maybe?

  1. #1
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default Double java error maybe?

    I posted this a while back in the HTML forum but got no luck. I was just looking over it again and threw some other forums and thought maybe its the java that's causing it cause there's two scripts hitting each other. I have multiple toggles and in each toggle there's some java that plays a flash movie (the jw player code). Right now only the top toggle works but it loads the last toggle's video for some reason except in Firefox. In Firefox this functions correctly. Which I thought was because Firefox was auto-correcting my HTML but i guess not. This is the page its on. http://www.bluewalrus.net/video.html
    Hope you can see what I mean and maybe have a solution. Thanks for any ideas you can offer.
    Last edited by bluewalrus; 12-14-2008 at 05:27 PM.

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    By no response here I'm going to assume no one has an idea to the problem and I should go on to recoding the page a different way?

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If its java, you are in the wrong forum. This the javascript forum.
    - John
    ________________________

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

  4. #4
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Oh...hmm I don't actually know which it is I have it placed as javascript in my document. I called it java here just short hand for javascript to type faster. I don't write java or javascript myself, I just find it and try and see if I can get it to work. These two java(scripts?) were working seperatley but then together the video part stopped. How can I tell if its java or javascript? Thanks.

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    OK, well one thing that's pretty obvious is that there are too many elements with the id of container. Only one element per page may have a given id. This is particularly important as concerns javascript. In FF it will just pick the first one. In IE it won't find any. I also notice that in IE 7, for some reason, the page never fully loads. So any script that depends upon an onload event will not initialize.
    - John
    ________________________

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

  6. The Following User Says Thank You to jscheuer1 For This Useful Post:

    bluewalrus (12-13-2008)

  7. #6
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Okay, I fixed the div problem but still no luck. I made one mistake when changing it, I took out one of the container id's, the first one, and it played the last video in the second div aka the then first occurrence of id container. Don't know if this helps at all or not. I don't know where container is being tested to see if the flash player is installed or id change it there to a class. Do you think it as a class would do it or should it be 6 different ids? I don't know where to do this yet but it seems like the right direction. Thanks

  8. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Separate ids will be required if your code accesses these elements by their ids. Another good idea would be to use a unique variable name in each call to SWFObject.

    And this isn't a valid Flash Object in IE:

    Code:
    <object type="application/x-shockwave-flash" data="blue.swf" width="950" height="120">
    <param name="topbanner" value="blue.swf"/><param name="wmode" value="transparent" /></object>
    That's probably why the page doesn't load in IE. You could use SWFObject to create the proper tags and/or, this code would work:

    Code:
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
               codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
               width="950" height="120">
    			<param name="movie" value="blue.swf"/> 
    			<param name="wmode" value="transparent"/>
    			<param name="topbanner" value="blue.swf"/>
    <!--[if IE]>
    FAIL (Your Browser Doesn't support Flash 8) <a title="Flash Downloads" style="text-decoration:underline;" href="http://www.macromedia.com/go/getflashplayer">Get or upgrade the Flash Player</a>.
    <![endif]-->
    			<!--[if !IE]> <-->
    <object type="application/x-shockwave-flash" data="blue.swf" width="950" height="120">
    <param name="topbanner" value="blue.swf"/><param name="wmode" value="transparent" />
    FAIL (Your Browser Doesn't support Flash 8) <a title="Flash Downloads" style="text-decoration:underline;" href="http://www.macromedia.com/go/getflashplayer">Get or upgrade the Flash Player</a>.</object>
    			<!--> <![endif]-->
    		   </object>
    Last edited by jscheuer1; 12-14-2008 at 02:01 AM. Reason: change 'should work' to 'would work' after testing
    - John
    ________________________

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

  9. The Following User Says Thank You to jscheuer1 For This Useful Post:

    bluewalrus (12-14-2008)

  10. #8
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Okay I think i got it thanks. I changed these two lines in all the divs with different ids and added in the code you gave me to display the swf and it now seems to be working.
    Code:
    <div id="container6">
    s1.write("container6");
    </script>
    </div>

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
  •