Someone else had this to say about the JS:
"It's pretty obvious why your javascript doesn'rt work - it uses Microsoft specifc code that will only work with IE on Windows! You shouldn't have any kind of XML stuff going on in your javascript - that ought to be all back up at the server. (Firefox...
Expanding on what I initially wrote -
apparently it can't find URL, because the loading isn't done.
"When you load("xxx.xml"), the objDOM is not really supporting getElementById. To retrieve the one node you have useful info, you can do it by using the definitely supported...
Hmmm, this is strange. I'm not declaring the XSL variable specifically, I'm just copying what you've written into my JS code:
var xml,xsl;
function uponSubmit()
{
if(document.implementation && document.implementation.createDocument)
{
// Mozilla
// Load XML
xml =...
The full HTML page (containing the form) is:
http://homepages.cs.ncl.ac.uk/g.j.parker/working/pagecheck.html
The JScript file is:
http://homepages.cs.ncl.ac.uk/g.j.parker/working/formscript.js
The XSL Stylesheet is:
http://homepages.cs.ncl.ac.uk/g.j.parker/working/stylesheet.xsl
The target...
Sorry, I've changed that bit to pages.xml. However, I get the following problems:
Error: xsl is not defined
Source File: formscript.js
Line: 49
Error: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXSLTProcessor.transformToDocument]" nsresult...
Jonty, thanks for that. Again, it works fine in IE, but in FF, brings the message:
Error: xsl is not defined
Source File: formscript.js
Line: 49
I also get:
Error: doTransform is not defined
Source File: formscript.js
Line: 43
Or sometimes:
Error: [Exception... "Node cannot be inserted at...
Thanks for your help tsuji and Sheco.
As I mentioned earlier, my main area of 'expertese' is XSLT. The above JavaScript was kindly given to me by another user, as I don't enough JS or VB to create a script of my own.
Do you know of anyone on this site who may be able to help me with the...
There was a particular line in some code I think you originally posted.
xmldone=xml.load("results.xml");
Fails in FF because it doesn't give it a chance to load. Is there any way of sorting this in the browser?
After talking to a few other people, it seems a server side solution would be easier - at least I could ensure everyone would be able to view my site.
I'd like some advice... is there anyone here that could perhaps give me their opinion on this?
I'm not an expert JavaScript user - this feature is an addition to my site which is out of the scope of my current knowledge.
Would it be simpler to use a server-side implementation? I'm not being lazy, I just don't know JavaScript well enough. My main areas are XML/XLST.
Jonty - I think my original solution could still be used. My original JavaScript failed repeatedly in FF but it seems this could be sorted. Please could you take a look at the above post and let me know what you think?
Oh, I kinda get it now. What loading are you talking about? It seems the Firefox page loads the script then fails, returning back to the form page, seemingly doing nothing. There's no loading left for it to do.
Oops, I guess this is more a problem with accessibility than with XML. I've posted in the 'Microsoft: Active Server Pages (ASP) forum.
http://www.tek-tips.com/viewthread.cfm?qid=1047394&page=1
Any help is much appreciated.
Hi tsuji
Thanks for trying that. Unfortunately it still doesn't work - Firefox still returns the error:
Error: document.getElementsByName("fieldvalue")[0] has no properties
Line: 31
It's strange that FF can't find 'fieldvalue' yet IE can.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.