From: VK on
On Apr 23, 12:13 am, VK <schools_r...(a)yahoo.com> wrote:
> On Apr 23, 12:00 am, CrazySeal <mariusz.barty...(a)gmail.com> wrote:
>
> > Could somebody help me? what to change to run this site without
> > apache.
>
> You question is already answered in my last post. Simply replace
>  var x = r.responseXML.getElementsByTagName("group");
> to
>  window.alert(r.responseText)
> to see it.

Have no idea if it still works and how widely/properly supported (we
are using our own parsing library), but try:

r = getXMLHttpRequest();
r = setRequestHeader('Content-Type', 'text/xml'); // <-
r.open('GET', '../xml/groups.xml', true);
r.onreadystatechange = showGroups;
r.send(null);
From: VK on
On Apr 23, 12:18 am, VK <schools_r...(a)yahoo.com> wrote:
>    r = setRequestHeader('Content-Type', 'text/xml'); // <-

damn... I mean:

r.setRequestHeader('Content-Type', 'text/xml');
From: VK on
On Apr 23, 12:20 am, VK <schools_r...(a)yahoo.com> wrote:
> On Apr 23, 12:18 am, VK <schools_r...(a)yahoo.com> wrote:
>
> >    r = setRequestHeader('Content-Type', 'text/xml'); // <-
>
> damn... I mean:
>
>      r.setRequestHeader('Content-Type', 'text/xml');

double damn... Sorry, did not work with XHR object directly for year.
Forget the above, try:

r.overrideMimeType('text/xml')

instead
From: foka on
VK pisze:
> r.setRequestHeader('Content-Type', 'text/xml');


Not working.
Now I have error when I run site on server, and my <select> list is empty:

uncaught exception: [Exception... "Component returned failure code:
0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.setRequestHeader]"
nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame ::
http://techrol.local/index.html :: <TOP_LEVEL> :: line 108" data: no]

and error when I run site localy:

uncaught exception: [Exception... "Component returned failure code:
0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.setRequestHeader]"
nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame ::
file:///C:/wamp/www/techrol/index.html :: <TOP_LEVEL> :: line 108" data: no]

line 108: r.setRequestHeader('Content-Type', 'text/xml');

any other Idea?

Foka
From: Thomas 'PointedEars' Lahn on
CrazySeal wrote:
^^^^^^^^^
So now you're a name-switcher, too? :-(

> I modyfied my code a little and on server is working but on local
> (without apache) my <select> is empty:
>
> My code:
> [...]
> function getXMLHttpRequest() {
> var request = false;
> try {
> request = new XMLHttpRequest();
> } catch(err1) {
> try {
> request = new ActiveXObject('Msxml2.XMLHTTP');
> } catch(err2) {
> try {
> request = new
> ActiveXObject('Microsoft.XMLHTTP');
> } catch(err3) {
> request = false;
> }
> }
> }
> return request;
> }
> [...]
> Could somebody help me? what to change to run this site without
> apache.

<news:1856377.56mABFhMhk(a)PointedEars.de>


PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9
Prev: Quicktime and innerHTML
Next: option & textnode