This thread was archived. Please ask a new question if you need help.
JSON response from PEAR received but not updating <div> via innerHTML
It is supposed to put the response in via innerHTML. It doesn't. Now IE8 works fine in this case.
The PEAR modules have in them the check for 'Gecko' to cover the bug found in earlier versions of FF.
All Replies (17)
Are there any relevant script errors in the console (Ctrl+Shift+j)?
Is there any page online that demonstrates this problem? If so, a link would be helpful.
There were a number of errors. All were warnings except one. That one was:
Timestamp: 6/6/2012 7:21:30 PM Error: Components.classes['@mozilla.org/extensions/manager;1'] is undefined Source File: chrome://jqs/content/overlay.js Line: 9
Here is the file: // %W% %E% // // Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. // ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. //
// get the JQS extension directory const id = "firstname.lastname@example.org"; var ext = Components.classes["@mozilla.org/extensions/manager;1"]
.getService(Components.interfaces.nsIExtensionManager) .getInstallLocation(id) .getItemLocation(id);
// create an nsILocalFile for the executable var file = Components.classes["@mozilla.org/file/local;1"]
// construct command line file.initWithPath(ext.path + "\\..\\..\\..\\..\\bin\\jqsnotify.exe");
// and launch it file.launch();
No, there is no page online as this is in an intranet behind a firewall that I access via VPN.
Before the error message there was a question mark message: Could not read chrome manifest 'file:///C:/Program%20Files/Mozilla%20Firefox/extensions/%7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D/chrome.manifest'.
You can disable the Java Quick Starter (JQS) extension.
- Tools -> Add-ons -> Extensions
- Control Panel -> Java -> Advanced tab -> Miscellaneous -> Java Quick Starter (disable)
"jqs" is associated with the Java Quick Starter. This may or may not be relevant to your problem, but if you do have that add-on, you could try disabling it here and see whether that makes any difference:
orange Firefox button or classic Tools menu > Add-ons > Extensions (already mentioned above)
Do you know whether it works correctly from inside the LAN? Just wondering whether we can rule out the remote access as an issue.
A standard diagnostic step is to try Firefox's Safe Mode to see whether it is caused by a custom setting or add-on.
First, I recommend backing up your Firefox settings in case something goes wrong. See Backing up your information. (You can copy your entire Firefox profile folder somewhere outside of the Mozilla folder.)
Next, restart Firefox in Safe Mode using
Help > Restart with Add-ons Disabled
In the Safe Mode dialog, do not check any boxes, just click "Continue in Safe Mode."
If the application operates correctly, this points to an add-on or custom setting as the likely problem.
Since I'm not familiar with PEAR and can't test, someone else will need to assist with further diagnosis.
Modified by jscher2000
I did the disabling of JQR and it made no difference.
Modified by sglickler
It is not the remote access.
Restarting in Safe Mode with add-ons disabled made no difference.
By any chance have you tested in Firefox 13, just in case this is related to a fixed bug?
I upgraded to 13.0 and it still didn't work.
OK, I have done a little more investigating (after going to version 13). The page that is put up is created from a template that Smarty uses. There is one place in it, a div with id of navbar, in the <body> area and that is the area that is to be painted with the innerHTML.
In Internet Explorer 8, the text painted and then was replaced by the innerHTML. In Firefox, the text painted and it stopped at the initApp(). When I hit continue, it finished and the text I put there disappeared.
Is there a way to force this to be run?
Modified by sglickler
In Firefox, View Source shows the original page. To see the modified page, first Select All (Ctrl+a) and then right-click and use View Selection Source. Then you'll probably see the script there.
This issue sounds familiar: for security reasons, I think Firefox might no longer parse scripts injected into a page in certain ways. Unfortunately, I haven't been able to find the relevant threads. However, if I am remembering correctly, there must be others who are running into this problem. What was the last version of Firefox in which this worked without a problem?
And, as an alternative to innerHTML, can you parse the response and create the <script> element using DOM methods instead?
Edit: I'm not familiar with "Smarty"; perhaps they have an update to address this?
Modified by jscher2000
I don't know the last version of Firefox when it worked. It would be the latest version that was in place in Feb. 2008. That was when I downloaded it and used it in the development of the product.
Are there any errors in the Error Console about that script?
Current Firefox version have a lot of other helpful tools.
In IE this script is run, but in Firefox it is not. The AJAX is handled by PEAR modules.
I suggested: as an alternative to innerHTML, can you parse the response and create the <script> element using DOM methods instead?
However, if there is no compelling reason to send the fully formed script from the server, it seems easier to have the script in the callback handling the JSON response, where it can then draw the menu using the parameters sent from the server.
I think what you are saying is to create the menu structure on the server side and send that back to the browser to be put in place via innerHTML as already built and not as a script. To do that I would have to go deeply into the inner workings of the DHTMLSuite in order to generate it in php on the server side. Is that what you mean?
I don't know what's best because from where I sit this whole discussion is like inspecting a battleship through the barrel of a ballpoint pen. :(
I don't know why the menu needs to dynamically requested via AJAX at all. Can you avoid doing that and use a simple script src= approach?
I don't think you need to change the plumbing, but perhaps your template suppliers have an update.