X
Tap here to go to the mobile version of the site.

Support Forum

A web wiget using java acript in my web site does not show up with Firefox but does with ie; how can I fix it?

Posted

I have inserted a java script web wiget on my web site by copy and paste. It works fine in IE (shows, updates data etc). In FFox it does not even show up and no error messages are given. If I look at the code in FFox, it is shown. Is there a problem with my web site or am I short something in FFox?

I have inserted a java script web wiget on my web site by copy and paste. It works fine in IE (shows, updates data etc). In FFox it does not even show up and no error messages are given. If I look at the code in FFox, it is shown. Is there a problem with my web site or am I short something in FFox?

Chosen solution

I hope I'm not violating any policies by posting code here:

This is the optional code your source offered. It seems to work in all my browsers. Firefox may not like the "object" tags for some reason.

<embed src=http://ActionAmerica.org/flash/gsdCount.swf width=240 height=175 wmode=transparent type=application/x-shockwave-flash></embed>

(I edited this because I posted the wrong code the first time.)

I tried it in Chrome, IE 10, and Firefox Aurora (The alpha version of Firefox). Aurora works quite well, by the way. IE 10's security settings made me approve running the script and it didn't show up until I clicked on where it should be, but I am using Windows 8 and there seem to unlimited numbers of bugs. It should probably show up on your XP machine.

Read this answer in context 1

Additional System Details

Installed Plug-ins

  • The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
  • Shockwave Flash 11.5 r502
  • RealPlayer(tm) LiveConnect-Enabled Plug-In
  • RealPlayer Download Plugin
  • Adobe PDF Plug-In For Firefox and Netscape 11.0.01
  • RealNetworks(tm) RealDownloader Chrome Background Extension Plug-In
  • RealNetworks(tm) RealDownloader PepperFlashVideoShim Plug-In
  • RealNetworks(tm) RealDownloader HTML5VideoShim Plug-In
  • RealDownloader Plugin
  • Autofill Engine for Gecko and Webkit-based web browsers
  • 1,2,1,2044
  • The plug-in allows you to open and edit files using Microsoft Office applications
  • Office Authorization plug-in for NPAPI browsers
  • Windows Presentation Foundation (WPF) plug-in for Mozilla browsers
  • DRM Netscape Network Object
  • Npdsplay dll
  • DRM Store Netscape Plugin

Application

  • User Agent: Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0

More Information

I am using Windows XP (w/SP3). I have also tried to load the wiget on another XP machine but same results. Both computers have just recently installed FFox v18. Flash player is latest available.

purevw 1 solutions 24 answers

First, is java enabled in your Firefox?

Different browsers treat some scripts differently. It may be that Firefox doesn't recognize it as an instruction and simply ignores it. When writing a web page, it needs to be tried in all possible browsers to ensure compatibility. It can be a headache at times.

You might go to the original page where you copied the script from and look through all the code. There may be references before your widget that infer: if browser is internet explorer, do this. If Firefox, do this. etc. It may be as simple as changing a couple of words.

First, is java enabled in your Firefox? Different browsers treat some scripts differently. It may be that Firefox doesn't recognize it as an instruction and simply ignores it. When writing a web page, it needs to be tried in all possible browsers to ensure compatibility. It can be a headache at times. You might go to the original page where you copied the script from and look through all the code. There may be references before your widget that infer: if browser is internet explorer, do this. If Firefox, do this. etc. It may be as simple as changing a couple of words.
cor-el
  • Top 10 Contributor
  • Moderator
12127 solutions 112682 answers

Helpful Reply

To avoid confusion: *http://kb.mozillazine.org/JavaScript_is_not_Java
cor-el
  • Top 10 Contributor
  • Moderator
12127 solutions 112682 answers

Which JavaScript code are you using to insert this widget?

Can you post a link to a publicly accessible page that doesn't require authentication (log in) to access it?

Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.

  • Press and hold Shift and left-click the Reload button.
  • Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
  • Press "Command + Shift + R" (MAC)
Which JavaScript code are you using to insert this widget? Can you post a link to a publicly accessible page that doesn't require authentication (log in) to access it? Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files. *Press and hold Shift and left-click the Reload button. *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux) *Press "Command + Shift + R" (MAC)

Question owner

Thanks to each of you for your suggestions. Reloading/refreshing does not change the problem. I am relatively new to web construction even though my computer experience dates back to the TI-994A (for you old timers) and I am not quite sure what you mean by "which' JavaScript I am using. I copied the script (with permission) from the following site: http://actionamerica.org/guns/gun-web-widget.shtml If you go to this page you will see the instructions given/followed and the actual code. As was suggested, I had already read the actual code and there was no reference to browser types. It just occurred to me that the same widget on the above referenced site does work in FFox which leads me to believe that the problem lies somehow in my code even though I placed the code as instructed.

Again, citing my inexperience, I understood that this was JavaScript. As I read the code, it is referred to as "object type=application/x-shockwave-flash". I may have mis-stated the problem; feel free to 'step on my foot'! The problem does exist but this may clarify the issue for those that do understand what I am doing, as I apparently don't! I have been using WebEasy 9 Pro to construct my site.

Thanks to each of you for your suggestions. Reloading/refreshing does not change the problem. I am relatively new to web construction even though my computer experience dates back to the TI-994A (for you old timers) and I am not quite sure what you mean by "which' JavaScript I am using. I copied the script (with permission) from the following site: http://actionamerica.org/guns/gun-web-widget.shtml If you go to this page you will see the instructions given/followed and the actual code. As was suggested, I had already read the actual code and there was no reference to browser types. It just occurred to me that the same widget on the above referenced site does work in FFox which leads me to believe that the problem lies somehow in my code even though I placed the code as instructed. Again, citing my inexperience, I understood that this was JavaScript. As I read the code, it is referred to as "object type=application/x-shockwave-flash". I may have mis-stated the problem; feel free to 'step on my foot'! The problem does exist but this may clarify the issue for those that do understand what I am doing, as I apparently don't! I have been using WebEasy 9 Pro to construct my site.
purevw 1 solutions 24 answers

Chosen Solution

I hope I'm not violating any policies by posting code here:

This is the optional code your source offered. It seems to work in all my browsers. Firefox may not like the "object" tags for some reason.

<embed src=http://ActionAmerica.org/flash/gsdCount.swf width=240 height=175 wmode=transparent type=application/x-shockwave-flash></embed>

(I edited this because I posted the wrong code the first time.)

I tried it in Chrome, IE 10, and Firefox Aurora (The alpha version of Firefox). Aurora works quite well, by the way. IE 10's security settings made me approve running the script and it didn't show up until I clicked on where it should be, but I am using Windows 8 and there seem to unlimited numbers of bugs. It should probably show up on your XP machine.

I hope I'm not violating any policies by posting code here: This is the optional code your source offered. It seems to work in all my browsers. Firefox may not like the "object" tags for some reason. <embed src=http://ActionAmerica.org/flash/gsdCount.swf width=240 height=175 wmode=transparent type=application/x-shockwave-flash></embed> (I edited this because I posted the wrong code the first time.) I tried it in Chrome, IE 10, and Firefox Aurora (The alpha version of Firefox). Aurora works quite well, by the way. IE 10's security settings made me approve running the script and it didn't show up until I clicked on where it should be, but I am using Windows 8 and there seem to unlimited numbers of bugs. It should probably show up on your XP machine.

Modified by purevw

amcorona 0 solutions 1 answers

I too am having a similar issue as of 18.0.1 I have flowplayer contained within a div id. The player randomly disappears and sometimes will display when I refresh.

This is on an intranet server running wowza. I can't deploy an example for anyone to look at on a public server. Works in Safari OS X, does not on FF and OS X. Works in IE 8 on Windows 7.


<script type="text/javascript" src="/v2/common/flowplayer-3.2.11.min.js"></script>
<a href="/v2/common/flowplayer.flv" style="display:block;width:640px;height:360px" id="player"></a>

        <script type="text/javascript">
        flowplayer("player", "/v2/common/flowplayer-3.2.4.swf",
                {
         key:'#xxxxxxxxxxxx',
          logo: {
                url: '/bluestream/resource/img/bug.png',
                top: 20, 
                right: 20, 
                opacity: 0.4, 
                fullscreenOnly: false,
                },
                        showErrors: true,
                        controls:  {
            backgroundGradient: 'none',
            backgroundColor: 'transparent',
            scrubber:false,
        },
                    canvas: {
        background: "url(/v2/common/nostream.png) no-repeat 50pct 50pct"
    },
 
                        clip: {
                                url: 'streamname',
                                live: true,
                                provider: 'rtmp'
                                        },
                        plugins: {
                                rtmp: {
                                url: 'http://servername/v2/common/flowplayer.rtmp-3.2.3.swf',
                                netConnectionUrl: 'rtmp://servername/streamnam'
                                }
                        }
                }
        );
</script>
I too am having a similar issue as of 18.0.1 I have flowplayer contained within a div id. The player randomly disappears and sometimes will display when I refresh. This is on an intranet server running wowza. I can't deploy an example for anyone to look at on a public server. Works in Safari OS X, does not on FF and OS X. Works in IE 8 on Windows 7. <pre><nowiki><script type="text/javascript" src="/v2/common/flowplayer-3.2.11.min.js"></script> <a href="/v2/common/flowplayer.flv" style="display:block;width:640px;height:360px" id="player"></a> <script type="text/javascript"> flowplayer("player", "/v2/common/flowplayer-3.2.4.swf", { key:'#xxxxxxxxxxxx', logo: { url: '/bluestream/resource/img/bug.png', top: 20, right: 20, opacity: 0.4, fullscreenOnly: false, }, showErrors: true, controls: { backgroundGradient: 'none', backgroundColor: 'transparent', scrubber:false, }, canvas: { background: "url(/v2/common/nostream.png) no-repeat 50pct 50pct" }, clip: { url: 'streamname', live: true, provider: 'rtmp' }, plugins: { rtmp: { url: 'http://servername/v2/common/flowplayer.rtmp-3.2.3.swf', netConnectionUrl: 'rtmp://servername/streamnam' } } } ); </script></nowiki></pre>

Modified by cor-el

Question owner

Thanks to all of you for your suggestions; all were good thoughts and valid. It was the obvious, as pointed out by purevw, that was the answer: Firefox apparently does not like object code but will accept the embed command. I used the alternative code and things work fine now. Thanks again to all of you who lent a hand.

Thanks to all of you for your suggestions; all were good thoughts and valid. It was the obvious, as pointed out by purevw, that was the answer: Firefox apparently does not like object code but will accept the embed command. I used the alternative code and things work fine now. Thanks again to all of you who lent a hand.
cor-el
  • Top 10 Contributor
  • Moderator
12127 solutions 112682 answers

The object tag should work in Firefox as long as there is a data attribute to specify the file and no classid to specify an ActiveX control for IE.

<object data="file.swf" height="xxx" width="xxx" type="application/x-shockwave-flash" >
 <param name="flashvars" value="<additional flash vars>" />
 <param (more params) />
</object>
The object tag should work in Firefox as long as there is a data attribute to specify the file and no classid to specify an ActiveX control for IE. <pre><nowiki><object data="file.swf" height="xxx" width="xxx" type="application/x-shockwave-flash" > <param name="flashvars" value="<additional flash vars>" /> <param (more params) /> </object> </nowiki></pre>

Question owner

cor-el, this will be a continuing pursuit in my quest for better knowledge of just how to make the code work for me, as I want it too! I will take this information and review the original code to see where it went wrong. Even though it works with the alternate code, I will still get a great satisfaction if I can make the object tag work. Thank you for taking the time to share your knowledge.

cor-el, this will be a continuing pursuit in my quest for better knowledge of just how to make the code work for me, as I want it too! I will take this information and review the original code to see where it went wrong. Even though it works with the alternate code, I will still get a great satisfaction if I can make the object tag work. Thank you for taking the time to share your knowledge.
cor-el
  • Top 10 Contributor
  • Moderator
12127 solutions 112682 answers
<object data="http://ActionAmerica.org/flash/tfdclock.swf" width=190 height=185 wmode=transparent type=application/x-shockwave-flash>
 <param name="movie" value="http://ActionAmerica.org/flash/tfdclock.swf" />
</object>

<object data="/v2/common/flowplayer-3.2.4.swf" width=640 height=360 wmode=transparent type=application/x-shockwave-flash>
 <param name="movie" value="/v2/common/flowplayer-3.2.4.swf" />
 <param name="flashvars" value="/v2/common/flowplayer.flv" />
</object>
<pre><nowiki><object data="http://ActionAmerica.org/flash/tfdclock.swf" width=190 height=185 wmode=transparent type=application/x-shockwave-flash> <param name="movie" value="http://ActionAmerica.org/flash/tfdclock.swf" /> </object></nowiki></pre> ---- <pre><nowiki><object data="/v2/common/flowplayer-3.2.4.swf" width=640 height=360 wmode=transparent type=application/x-shockwave-flash> <param name="movie" value="/v2/common/flowplayer-3.2.4.swf" /> <param name="flashvars" value="/v2/common/flowplayer.flv" /> </object></nowiki></pre>

Modified by cor-el