<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>CodeGuru Forums - AJAX</title>
		<link>http://forums.codeguru.com/</link>
		<description>Post questions and discussions related to AJAX - Asynchronous javascript and XML.</description>
		<language>en</language>
		<lastBuildDate>Thu, 20 Jun 2013 06:23:28 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://forums.codeguru.com/images/misc/rss.png</url>
			<title>CodeGuru Forums - AJAX</title>
			<link>http://forums.codeguru.com/</link>
		</image>
		<item>
			<title>formdata files array not working in firefox, but works in chrome and opera</title>
			<link>http://forums.codeguru.com/showthread.php?537589-formdata-files-array-not-working-in-firefox-but-works-in-chrome-and-opera&amp;goto=newpost</link>
			<pubDate>Thu, 06 Jun 2013 05:03:39 GMT</pubDate>
			<description><![CDATA[I'm using this javascript code, per Mozilla docs, but it's not working in Mozilla, just in Chrome and Opera (don't know if it's working in ie 10--FormData is supposedly supported in IE version 10--but I'm only really concerned about Firefox).


Code:
---------
var data = new FormData(document.getElementById("uploadform"));		
var selected_file = document.getElementById('file').files[0];	
data.append('file-0', selected_file);
---------
firefox also causes server error on the ajax file upload:


Code:
---------
[Wed Jun 05 21:34:53 2013] [error] [client ::1] PHP Notice:  Undefined index: file-0 in /home/jeff/public/website.com/public/upload.php on line 11, referer: http://localhost/
---------
I have no idea why "files" does not seem to be working. I've posted on Mozilla support forum with no answers, and on stack overflow with one attempted answer. Here's the relevant Mozilla docs page: Using FormData Objects (https://developer.mozilla.org/en-US/docs/Web/Guide/Using_FormData_Objects).

I've tested firefox 21, 24 nightly, and 10 on a linux machine, and tested firefox 21 on a windows machine, all with the same results.]]></description>
			<content:encoded><![CDATA[<div>I'm using this javascript code, per Mozilla docs, but it's not working in Mozilla, just in Chrome and Opera (don't know if it's working in ie 10--FormData is supposedly supported in IE version 10--but I'm only really concerned about Firefox).<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">var data = new FormData(document.getElementById(&quot;uploadform&quot;));&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
var selected_file = document.getElementById('file').files[0];&nbsp; &nbsp; &nbsp; &nbsp; <br />
data.append('file-0', selected_file);</code><hr />
</div>firefox also causes server error on the ajax file upload:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">[Wed Jun 05 21:34:53 2013] [error] [client ::1] PHP Notice:&nbsp; Undefined index: file-0 in /home/jeff/public/website.com/public/upload.php on line 11, referer: http://localhost/</code><hr />
</div>I have no idea why &quot;files&quot; does not seem to be working. I've posted on Mozilla support forum with no answers, and on stack overflow with one attempted answer. Here's the relevant Mozilla docs page: <a rel="nofollow" href="https://developer.mozilla.org/en-US/docs/Web/Guide/Using_FormData_Objects" target="_blank">Using FormData Objects</a>.<br />
<br />
I've tested firefox 21, 24 nightly, and 10 on a linux machine, and tested firefox 21 on a windows machine, all with the same results.</div>

]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?88-AJAX">AJAX</category>
			<dc:creator>JeffAgee</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?537589-formdata-files-array-not-working-in-firefox-but-works-in-chrome-and-opera</guid>
		</item>
		<item>
			<title>Ajax Javascript query does not run more than once</title>
			<link>http://forums.codeguru.com/showthread.php?537505-Ajax-Javascript-query-does-not-run-more-than-once&amp;goto=newpost</link>
			<pubDate>Sun, 02 Jun 2013 06:10:50 GMT</pubDate>
			<description><![CDATA[index.php

Code:
---------
<div style="position:fixed; left:300px; top: 500px; display:inline-block;"><strong><i><a href="#" id="previous" onClick="process('previous','<?=$postID?>')">Previous</a></i></strong></div>
---------
getpost.js

Code:
---------
var xmlHttp = createXmlHttpRequestObject();

function createXmlHttpRequestObject() {
    var xmlHttp;
    if(window.ActivexObject) {
        try{
            xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
        } catch(e) {
            xmlHttp = false;
        }
    } else {
        try {
            xmlHttp = new XMLHttpRequest();
        } catch(e) {
            xmlHttp = False;
        }
    }
    
    if(!xmlHttp)
        alert("XML Http Objhect cannot be created");
    
    else
        return xmlHttp;
}

function process(direction,$postID) {
    var direction = direction;
    var postID = $postID;
    
    if(xmlHttp.readyState==0 || xmlHttp.readystate==4) {//check if server is ready
        try{
            if (direction == 'previous') {
                xmlHttp.open("GET","getpost.php?postID="+postID+"&direction=previous", true);
            } else if (direction == 'next') {
                xmlHttp.open("GET","getpost.php?postID="+postID+"&direction=next", true);
            }
            xmlHttp.send('');
            //            xmlHttp.onreadystatechange = handleServerResponse;
            
            xmlHttp.onreadystatechange=function()
            {
                //                alert(xmlHttp.readyState + " " + xmlHttp.status);
                if (xmlHttp.readyState==4 && xmlHttp.status==200)
                {
                    xmlResponse = xmlHttp.responseXML;
                    xmlDocumentElement = xmlResponse.documentElement;
                    message = xmlDocumentElement.firstChild.data;
                    //document.getElementById("journalcontent").innerHTML = '<span style="color:blue">'+ message + '</span>';

                    var showElements = xmlResponse.getElementsByTagName("response");
                    //alert(showElements);//objectnodelist
                    
                    for (var x=0; x<showElements.length; x++) 
                    {
                        var journalID = showElements[x].childNodes[0].firstChild.data;
                        var title = showElements[x].childNodes[2].firstChild.data;                    
                        var content = showElements[x].childNodes[3].firstChild.data;                    
                        var datetime = showElements[x].childNodes[4].firstChild.data;
                        content = nl2br(content);
                        total = '<strong>' + title + '</strong><br /><br />' + content;
                        document.getElementById("journalcontent").innerHTML = total + '<div style="text-align:right;  border-bottom-width:2px; border-bottom-style:dashed; border-bottom-color:black;" id="datetime"></div>';
                        datetime = '<strong>' + datetime + '</strong>';
                        document.getElementById("datetime").innerHTML = datetime;
                        alert(journalID);
                        $('#previous').attr("onClick", "process('previous','"+ journalID + "')");
                    //                        document.getElementById("previous").onClick = "process('previous',<?="+ journalID + "?>)";
                    }
                    
//                    ajaxFinished = 1;
//                    
//                    //need to close the connection.
//                    xmlHttp = null;
                }
            }

        } catch(e) {
            alert(e.toString());
        }
    } else {
        setTimeout('process(direction,postID)', 1000)
    }
}

function nl2br (str, is_xhtml) {
    // http://kevin.vanzonneveld.net
    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: Philip Peterson
    // +   improved by: Onno Marsman
    // +   improved by: Atli Þór
    // +   bugfixed by: Onno Marsman
    // +      input by: Brett Zamir (http://brett-zamir.me)
    // +   bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: Brett Zamir (http://brett-zamir.me)
    // +   improved by: Maximusya
    // *     example 1: nl2br('Kevin\nvan\nZonneveld');
    // *     returns 1: 'Kevin<br />\nvan<br />\nZonneveld'
    // *     example 2: nl2br("\nOne\nTwo\n\nThree\n", false);
    // *     returns 2: '<br>\nOne<br>\nTwo<br>\n<br>\nThree<br>\n'
    // *     example 3: nl2br("\nOne\nTwo\n\nThree\n", true);
    // *     returns 3: '<br />\nOne<br />\nTwo<br />\n<br />\nThree<br />\n'
    var breakTag = (is_xhtml || typeof is_xhtml === 'undefined') ? '<br ' + '/>' : '<br>'; // Adjust comment to avoid issue on phpjs.org display

    return (str + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + breakTag + '$2');
}
---------
.

getpost.php works fine

I am able to click the button and get data back, but I am unable to get data back the second time I click the button.
Why?
I have also tried using the below 2
1. 
//                    ajaxFinished = 1;

2.
//                    //need to close the connection.
//                    xmlHttp = null;]]></description>
			<content:encoded><![CDATA[<div>index.php<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&lt;div style=&quot;position:fixed; left:300px; top: 500px; display:inline-block;&quot;&gt;&lt;strong&gt;&lt;i&gt;&lt;a href=&quot;#&quot; id=&quot;previous&quot; onClick=&quot;process('previous','&lt;?=$postID?&gt;')&quot;&gt;Previous&lt;/a&gt;&lt;/i&gt;&lt;/strong&gt;&lt;/div&gt;</code><hr />
</div>getpost.js<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">var xmlHttp = createXmlHttpRequestObject();<br />
<br />
function createXmlHttpRequestObject() {<br />
&nbsp; &nbsp; var xmlHttp;<br />
&nbsp; &nbsp; if(window.ActivexObject) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; try{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlHttp = new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; } catch(e) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlHttp = false;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; try {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlHttp = new XMLHttpRequest();<br />
&nbsp; &nbsp; &nbsp; &nbsp; } catch(e) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlHttp = False;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; if(!xmlHttp)<br />
&nbsp; &nbsp; &nbsp; &nbsp; alert(&quot;XML Http Objhect cannot be created&quot;);<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; else<br />
&nbsp; &nbsp; &nbsp; &nbsp; return xmlHttp;<br />
}<br />
<br />
function process(direction,$postID) {<br />
&nbsp; &nbsp; var direction = direction;<br />
&nbsp; &nbsp; var postID = $postID;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; if(xmlHttp.readyState==0 || xmlHttp.readystate==4) {//check if server is ready<br />
&nbsp; &nbsp; &nbsp; &nbsp; try{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (direction == 'previous') {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlHttp.open(&quot;GET&quot;,&quot;getpost.php?postID=&quot;+postID+&quot;&amp;direction=previous&quot;, true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else if (direction == 'next') {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlHttp.open(&quot;GET&quot;,&quot;getpost.php?postID=&quot;+postID+&quot;&amp;direction=next&quot;, true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlHttp.send('');<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlHttp.onreadystatechange = handleServerResponse;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlHttp.onreadystatechange=function()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alert(xmlHttp.readyState + &quot; &quot; + xmlHttp.status);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (xmlHttp.readyState==4 &amp;&amp; xmlHttp.status==200)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlResponse = xmlHttp.responseXML;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlDocumentElement = xmlResponse.documentElement;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message = xmlDocumentElement.firstChild.data;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //document.getElementById(&quot;journalcontent&quot;).innerHTML = '&lt;span style=&quot;color:blue&quot;&gt;'+ message + '&lt;/span&gt;';<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var showElements = xmlResponse.getElementsByTagName(&quot;response&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //alert(showElements);//objectnodelist<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (var x=0; x&lt;showElements.length; x++) <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var journalID = showElements[x].childNodes[0].firstChild.data;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var title = showElements[x].childNodes[2].firstChild.data;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var content = showElements[x].childNodes[3].firstChild.data;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var datetime = showElements[x].childNodes[4].firstChild.data;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; content = nl2br(content);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; total = '&lt;strong&gt;' + title + '&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;' + content;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&quot;journalcontent&quot;).innerHTML = total + '&lt;div style=&quot;text-align:right;&nbsp; border-bottom-width:2px; border-bottom-style:dashed; border-bottom-color:black;&quot; id=&quot;datetime&quot;&gt;&lt;/div&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; datetime = '&lt;strong&gt;' + datetime + '&lt;/strong&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&quot;datetime&quot;).innerHTML = datetime;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alert(journalID);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $('#previous').attr(&quot;onClick&quot;, &quot;process('previous','&quot;+ journalID + &quot;')&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&quot;previous&quot;).onClick = &quot;process('previous',&lt;?=&quot;+ journalID + &quot;?&gt;)&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
//&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ajaxFinished = 1;<br />
//&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
//&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //need to close the connection.<br />
//&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlHttp = null;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; } catch(e) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alert(e.toString());<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; setTimeout('process(direction,postID)', 1000)<br />
&nbsp; &nbsp; }<br />
}<br />
<br />
function nl2br (str, is_xhtml) {<br />
&nbsp; &nbsp; // http://kevin.vanzonneveld.net<br />
&nbsp; &nbsp; // +&nbsp;  original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)<br />
&nbsp; &nbsp; // +&nbsp;  improved by: Philip Peterson<br />
&nbsp; &nbsp; // +&nbsp;  improved by: Onno Marsman<br />
&nbsp; &nbsp; // +&nbsp;  improved by: Atli Þór<br />
&nbsp; &nbsp; // +&nbsp;  bugfixed by: Onno Marsman<br />
&nbsp; &nbsp; // +&nbsp; &nbsp; &nbsp; input by: Brett Zamir (http://brett-zamir.me)<br />
&nbsp; &nbsp; // +&nbsp;  bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)<br />
&nbsp; &nbsp; // +&nbsp;  improved by: Brett Zamir (http://brett-zamir.me)<br />
&nbsp; &nbsp; // +&nbsp;  improved by: Maximusya<br />
&nbsp; &nbsp; // *&nbsp; &nbsp;  example 1: nl2br('Kevin\nvan\nZonneveld');<br />
&nbsp; &nbsp; // *&nbsp; &nbsp;  returns 1: 'Kevin&lt;br /&gt;\nvan&lt;br /&gt;\nZonneveld'<br />
&nbsp; &nbsp; // *&nbsp; &nbsp;  example 2: nl2br(&quot;\nOne\nTwo\n\nThree\n&quot;, false);<br />
&nbsp; &nbsp; // *&nbsp; &nbsp;  returns 2: '&lt;br&gt;\nOne&lt;br&gt;\nTwo&lt;br&gt;\n&lt;br&gt;\nThree&lt;br&gt;\n'<br />
&nbsp; &nbsp; // *&nbsp; &nbsp;  example 3: nl2br(&quot;\nOne\nTwo\n\nThree\n&quot;, true);<br />
&nbsp; &nbsp; // *&nbsp; &nbsp;  returns 3: '&lt;br /&gt;\nOne&lt;br /&gt;\nTwo&lt;br /&gt;\n&lt;br /&gt;\nThree&lt;br /&gt;\n'<br />
&nbsp; &nbsp; var breakTag = (is_xhtml || typeof is_xhtml === 'undefined') ? '&lt;br ' + '/&gt;' : '&lt;br&gt;'; // Adjust comment to avoid issue on phpjs.org display<br />
<br />
&nbsp; &nbsp; return (str + '').replace(/([^&gt;\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + breakTag + '$2');<br />
}</code><hr />
</div>.<br />
<br />
getpost.php works fine<br />
<br />
I am able to click the button and get data back, but I am unable to get data back the second time I click the button.<br />
Why?<br />
I have also tried using the below 2<br />
1. <br />
//                    ajaxFinished = 1;<br />
<br />
2.<br />
//                    //need to close the connection.<br />
//                    xmlHttp = null;</div>

]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?88-AJAX">AJAX</category>
			<dc:creator>92968</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?537505-Ajax-Javascript-query-does-not-run-more-than-once</guid>
		</item>
		<item>
			<title><![CDATA[[RESOLVED] XML to Javascript - Conversion of response.]]></title>
			<link>http://forums.codeguru.com/showthread.php?537309-RESOLVED-XML-to-Javascript-Conversion-of-response&amp;goto=newpost</link>
			<pubDate>Sun, 26 May 2013 06:07:32 GMT</pubDate>
			<description><![CDATA[results from getpost.php

<response>
<journalID>4</journalID>
<accountID>1</accountID>
<title>testtest</title>
<content>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce sapien nisl, convallis vitae sodales sed, convallis eu nunc. Donec sem libero, semper non tempor non, tincidunt non dui. Phasellus tempus, est quis congue posuere, dolor enim ultricies lectus, ullamcorper porttitor sem nisl eu justo. Morbi ultricies porttitor odio ut eleifend. Integer gravida convallis laoreet. Proin scelerisque, libero sed varius venenatis, turpis nisi malesuada tortor, ac fermentum quam est eu est. Integer semper pellentesque magna, eu molestie tellus porta viverra. Quisque pellentesque fermentum quam et mattis. Praesent lacinia fringilla ipsum, quis rhoncus turpis tristique nec. Donec mollis euismod lacinia. Vestibulum nulla ligula, volutpat nec tincidunt eget, convallis sed ante.
</content>
<datetime>2013-05-12 16:23:56</datetime>
</response>

How do I convert this to be able to use it in my javascript?
I need it to be in array form or at least in individual variables.

Sincerely yours,
D]]></description>
			<content:encoded><![CDATA[<div>results from getpost.php<br />
<br />
&lt;response&gt;<br />
&lt;journalID&gt;4&lt;/journalID&gt;<br />
&lt;accountID&gt;1&lt;/accountID&gt;<br />
&lt;title&gt;testtest&lt;/title&gt;<br />
&lt;content&gt;<br />
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce sapien nisl, convallis vitae sodales sed, convallis eu nunc. Donec sem libero, semper non tempor non, tincidunt non dui. Phasellus tempus, est quis congue posuere, dolor enim ultricies lectus, ullamcorper porttitor sem nisl eu justo. Morbi ultricies porttitor odio ut eleifend. Integer gravida convallis laoreet. Proin scelerisque, libero sed varius venenatis, turpis nisi malesuada tortor, ac fermentum quam est eu est. Integer semper pellentesque magna, eu molestie tellus porta viverra. Quisque pellentesque fermentum quam et mattis. Praesent lacinia fringilla ipsum, quis rhoncus turpis tristique nec. Donec mollis euismod lacinia. Vestibulum nulla ligula, volutpat nec tincidunt eget, convallis sed ante.<br />
&lt;/content&gt;<br />
&lt;datetime&gt;2013-05-12 16:23:56&lt;/datetime&gt;<br />
&lt;/response&gt;<br />
<br />
How do I convert this to be able to use it in my javascript?<br />
I need it to be in array form or at least in individual variables.<br />
<br />
Sincerely yours,<br />
D</div>

]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?88-AJAX">AJAX</category>
			<dc:creator>92968</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?537309-RESOLVED-XML-to-Javascript-Conversion-of-response</guid>
		</item>
	</channel>
</rss>
