Ok, not necessarily Linux focused, but still, I need this working under
firefox really, if I can get it running on my ubuntu box too all the better,
let me explain.

Today (and bear in mind I am not a programmer by any stretch of the
imagination) at work I had to start learning how to use XML,  the bigger
picture being I am  required this year as part of my "strategic personal
development programme", to learn  a few programming languages  that we can
put to use within the company,  such as XML, XSL,  ASP, VBScript and ASP.
Yes, Like I said,  nightmare! I know nothing, so lets start from the basics,
I  had a look at some tutorials online, namely:-

http://www.w3schools.com/xml/default.asp

and

http://msdn2.microsoft.com/en-us/library/ms950734.aspx

and from these tutorials I had a mad idea for a first project, to make a
very rough web-based application of a phone directory, the actual "database"
would be a flat text XML file, that I could then manipulate (sort by name,
company etc) using web-forms and data islands as I beleive they are called
(loading of XML data into a webpage).

This works fine under internet explorer, and although  I have only got a few
basic functions working so far, it is enough to play about, anyway when I
got home, and fired up ubuntu, I loaded the webpage and all I got was a
table with no data in it, and an error that said something like
"xmldso.loadis not a valid function".

I rebooted and went into Windows and loaded Firefox and got pretty much the
same error, yet it works fine under IE. I since did a bit of research and
apparently the <XML> tags are being flagged as ActiveX, although the other
problem is I think the code between the <script> tags, might be VBscript.

You can get a similar effect if you clck on the second link and download the
"discuss.exe" which will actually downoad you a self extracting archive
(exe, with the html, xml, and xsl pages needed) to veiw and sort some
fictitious patient records, although I tweaked the actual data for my own
"telephone directory" needs, which anyone is welcome to - I can  send a zip
file with the files in  - only a matter of a few kilobytes, all the entries
are fictitious at the moment.


Below is the code from the main file, can anyone  look at it and tell me why
it does not load under firefox (even under windows)?

<HTML>
<BODY>

<XML id=xmldso></XML>
<XML id=sortName src="sortName.xsl"></XML>
<XML id=sortCompany src="sortCompany.xsl"></XML>

<SCRIPT>
xmldso.async = false;
xmldso.load("tel-index.xml");
var xmldoc = xmldso.cloneNode(true);

function sort(xsldoc){
 xmldoc.documentElement.transformNodeToObject(xsldoc.documentElement,
xmldso.XMLDocument);
}
</SCRIPT>

<table datasrc="#xmldso" width="100%" border="1">

<thead align="left">
<th><INPUT TYPE=BUTTON VALUE="Name" onclick="sort(sortName.XMLDocument
);"></th>
<th><INPUT TYPE=BUTTON VALUE="Company Name" onclick="sort(
sortCompany.XMLDocument);"></th>
<th>Home Phone</th>
<th>Work Phone</th>
<th>Mobile</th>
</thead>

<tr align="left">
<td><span datafld="NAME"></span></td>
<td><span datafld="COMPANY"></span></td>
<td><span datafld="HOMEPHONE"></span></td>
<td><span datafld="WORKPHONE"></span></td>
<td><span datafld="MOBILE"></span></td>
</tr>
</table>



</BODY>
</HTML>


--
*****
Richard Forth

"I used to be indecisive, but now, I''m not so sure!"

*****
_______________________________________________
Peterboro mailing list
[email protected]
https://mailman.lug.org.uk/mailman/listinfo/peterboro

Reply via email to