Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

ابحث في الدعم

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

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?

  • 10 ردود
  • 3 have this problem
  • 1 view
  • آخر ردّ كتبه cor-el

more options

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?

الحل المُختار

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

All Replies (10)

more options

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.

more options
more options

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)
more options

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.

more options

الحل المُختار

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

more options

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>

Modified by cor-el

more options

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.

more options

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>
more options

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.

more options
<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>

Modified by cor-el