473,761 Members | 8,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Firefox doesn`t load scripts after reconnect

54 New Member
Hi,

I`m using dynamic script tags to dynamically load scripts from a remote server and it works well.

I`m simulating a network issue by disconnecting from the network and reconnecting. Then I`m trying to load scripts again.

On FireBug I can see that the browser gets the correct response from the server but the scripts aren`t being excuted.
On IE7 it works fine.

Is this a know issue with firefox?
Is there a workaround?

Thanks
Dec 17 '07 #1
3 1677
acoder
16,027 Recognized Expert Moderator MVP
Post your code which loads the scripts.
Dec 18 '07 #2
dolittle
54 New Member
steps to reproduce:
- disconnect from the network.
- reconnect
- create a dynamic script tag and request YAHOO services for example - it works!!

now try this:
- disconnect from the network
- create a dynamic script tag. Obviously it wouldn`t work.
- reconnect.
- create another dynamic script tag. It works in IE7 but FF doesn`t execute the script although on firebug I can see the request and response

Expand|Select|Wrap|Line Numbers
  1. var script = document.createElement("script");
  2. script.setAttribute("src", url);
  3. script.setAttribute("type", "text/javascript");
  4. script.setAttribute("id", "someID");
  5. document.getElementsByTagName("head")[0].appendChild(script);
Dec 19 '07 #3
acoder
16,027 Recognized Expert Moderator MVP
It may be a caching issue. Try using a unique URL, e.g. with the time appended: url + new Date().getTime( )
Dec 20 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1804
by: ekimnosnews | last post by:
I'm programming a JS tile map editor for my friend's game. The map editor has different "sections" that contain different tiles. The way that it works is when you select a section it calls a JS function that changes the src of a script tag that contains the array of tiles for that section, then reloads the tile selection table. This works great in IE, but Mozilla/Firefox doesn't update the array when I switch JS files. I've tried putting a...
2
2927
by: Van der Weij | last post by:
Hi, I want to preload some images for a webpage _and_ determing their width and height. The problem is that the scripts continue while the images are loaded in the background, while I need the thus undefined values of image.width and image.height. Thus I'm looking for a function which stops executing my script until the images are all fully loaded.
45
4747
by: Pat | last post by:
its seems asp.net validation doesn't fire when using FireFox? Tested a page and it doesn't fire. It seems the javascript doesn't fire Any ideas?
7
7662
by: chris | last post by:
Firefox seems to be restricting JavaScript image loading. The following code works fine in all browsers except Firefox: function loadImage() { var objIcon = document.createElement( 'IMG' ); objIcon.src = "/techJournal/firefoxIcon.png"; document.body.appendChild( objIcon ); }
4
2161
by: petermichaux | last post by:
Hi, I'm hoping for a reason I'm wrong or an alternate solution... I'd like to be able to dynamically include some javascript files. This is like scriptaculous.js library but their solution is broken in Firefox 1.5.0.1 on OS X. What happens with the Scriptaculous library is this In the html document the author only has to include one line
2
2222
by: stroumf | last post by:
Hey, My problem is the following: I need to use functions from different javascripts and I don't want to load all the javascripts initially. So I need to load the scripts on demand. Now I know how I can load a script dynamically: function loadScript(scriptname) { var e = document.createElement("script"); e.src = scriptname+".js";
12
2613
by: tim | last post by:
I am using foldoutmenu 3 and am having problems with viewing my menus in firefox. On my sub3 menus i have more than one line of text in some places. firefox does not recognise that there is more than one line and the text simply overlaps the sub-menus below it. I thought i had got around this by placing empty 'spacers' like so; oFoldMenu.make('sub3','')//spacer unfortunately, i have just viewed the site in IExplorer and it has added...
8
9671
by: grpramodkumar | last post by:
HI, function change(value,sub) { subcat = document.getElementById(sub); subcat.options.value = value; }
11
1138
by: GarryJones | last post by:
I needed to hide and show som DIV sections, There are many scripts on the net for this. I downloaded that allows me to open a hidden DIV from inside a DIV than is itself hidden. This accomplished I was pleased with my work. That was until I saw the mess in Firefox which ignores everything I tell it to do and opens all the DIVs regardless on load. Forgetting the browser war jargon as to why Firefox would release a program that doesn't...
0
9522
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10111
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9948
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9902
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7327
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6603
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3866
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3446
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2738
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.