× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Walden:

<snip>
One of the things that has amazed me about all these Ajax posts is that
everyone is writing (or attempting to write) the client-side javascript code
themselves. WHY?
</snip>

I agree completely - there are a whole host of good, quality options.  I did
just that for the JS side of things.  I chose www.AjaxToolbox.com.  Actually
it really wasn't the client side that was giving me fits...it was the server
side (I've only been coding RPG since 1988...still must be a newbie!).  I
still don't understand why the CGIDEV2 write of my XML was going to QPRINT
instead of the browser, but that is now just a curiosity...I'm removing the
CGIDEV2 part and sticking with RSP as I have that working...to a degree.

Even after Schadd's post telling me how to set the content header (yes, I
have the manual...missed it anyway), I still can't get output to go to
responseXML.  As a short-term solution I am pushing the XML found in
responseText to the MS XML parser.  Since I'm writing an in-house
application, I can be certain that everyone is using IE, so I don't need to
worry about browser-compatibility issues.  Here's the JS:

        // This is what I want to do, but can't do
    var xmldoc = req.responseXML;
        // So I replaced it with the next block

        // Here is how I forced the responseText to be treated as an XML
document
    var rsptext = req.responseText;
    var xmldoc = new ActiveXObject("Microsoft.XMLDOM");
    xmldoc.async=false;
    xmldoc.loadXML(rsptext);

        // Extracting values then remains the same
    var xmlfield = xmldoc.getElementsByTagName('myfield')[0];
    var newval   = xmlfield.firstChild.nodeValue;

(I know that this last piece only gets a single tag-value...which is what I
have in this case.)

Anyway, thanks again to all who offered help...I still don't understand why
it was writing the XML to a printer and I have to resolve the content-header
issue, but at least I can proceed and fix that in time.

--Bruce Guetzkow




As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.