Thread: [Sarissa-users] A good tutorial and/or description
Brought to you by:
mbatsis
From: Cecil W. <Cec...@xs...> - 2007-01-11 09:42:27
|
I am new to Sarissa (and AJAX). Is there a good tutorial and/or description to get get me really started? I know of http://sarissa.sourceforge.net/doc/, but I do not find this very helpfull. -- Cecil Westerhof <Cec...@xs...> |
From: Manos B. <man...@ge...> - 2007-01-11 13:45:05
|
Quoting Cecil Westerhof <Cec...@xs...>: > I am new to Sarissa (and AJAX). Is there a good tutorial and/or > description to get get me really started? I know of > http://sarissa.sourceforge.net/doc/, but I do not find this very > helpfull. Err, perhaps you could provide suggestions on what should be there or even help with it? Helping us improve the documentation in any way is very welcome and benefits everyone. You can find sarissa or other ajax tutorials on google, for example "Ajax" by Ross Shannon [1] and "Sarissa to the rescue" [2] by some guy. [1] http://www.yourhtmlsource.com/javascript/ajax.html [2] http://www.xml.com/pub/a/2005/02/23/sarissa.html hth, Manos |
From: Cecil W. <Cec...@xs...> - 2007-01-13 06:24:28
|
Op do, 11-01-2007 te 05:45 -0800, schreef Manos Batsis: > > I am new to Sarissa (and AJAX). Is there a good tutorial and/or > > description to get get me really started? I know of > > http://sarissa.sourceforge.net/doc/, but I do not find this very > > helpfull. > > Err, perhaps you could provide suggestions on what should be there or > even help with it? Helping us improve the documentation in any way is > very welcome and benefits everyone. > > You can find sarissa or other ajax tutorials on google, for example > "Ajax" by Ross Shannon [1] and "Sarissa to the rescue" [2] by some guy. > > [1] http://www.yourhtmlsource.com/javascript/ajax.html > [2] http://www.xml.com/pub/a/2005/02/23/sarissa.html I came to Sarissa through a book and understood that I should use something like: xmlhttp = new XMLHttpRequest(); xmlhttp.open('GET', url + actionCode, false); xmlhttp.send(''); And your first link follows this also. (I think I allready saw it.) But your second link uses: var oDomDoc = Sarissa.getDomDocument("http://myserver/ns/uri","foo"); // set loading method to synchronous oDomDoc.async = false; // populate the DOM Document using a remote file oDomDoc.load("path/to/my/file.xml"); // report any XML parsing errors if(oDomDoc.parseError != 0){ // construct a human readable // error description alert(Sarissa.getParseErrorText(oDomDoc);); }else{ // show loaded XML alert(Sarissa.serialize(oDomDoc);); }; What is the best way to work? When you look at the class XMLHttpRequest, there is not a lot of info. But proberly I should get my information from the Sarissa class. ;-} What also would be nice, is some background information. I worked first as described above. The problem was that changed documents where not always fetched. So I changed it to 'POST'. But when I tested it on MIE it did not work there. So I changed it back to 'GET' and made sure there was a nocache in the header off the response from my cgi-script. -- Cecil Westerhof <Cec...@xs...> |
From: Cecil W. <Cec...@xs...> - 2007-01-13 07:11:55
|
Op za, 13-01-2007 te 07:24 +0100, schreef Cecil Westerhof: > When you look at the class XMLHttpRequest, there is not a lot of info. > But proberly I should get my information from the Sarissa class. ;-} With JavaScript you can very easy see which properties an abject has. It looks like a XMLHttpRequest has always: onreadystatechange open readystate responseText responseXML send status statusText I think that with this information I can manage for the moment. I have only one further question. I see send(null) and send(''). What is the difference between the two. What can further be given as a parameter to send? -- Cecil Westerhof <Cec...@xs...> |
From: Manos B. <man...@ge...> - 2007-01-13 15:21:33
|
Cecil Westerhof wrote: > I came to Sarissa through a book and understood that I should use > something like: > xmlhttp = new XMLHttpRequest(); Yup. > But your second link uses:[...] > oDomDoc.load("path/to/my/file.xml"); Although Sarissa.getDomDocument cannot get any better as far as obtaining a DOM object instance goes, the XMLHttpRequest is far more appropriate to obtain a DOM from a *remote* XML document. It is far more consistent between browsers when compared to the .load stuff, hence the deprecated code in sarissa_ieemu_load.js. > When you look at the class XMLHttpRequest, there is not a lot of info. Thats because its not implemented within Sarissa; it is part of the native API in each browser, with the exception of the constructor in IE versions prior to 7. hth, Manos |