Comments for Ajax Tutorial : Ajax Help and Tutorials Helping newbies learn AJAX with Tutorials Sat, 08 Jan 2011 17:21:04 +0000 hourly 1 http://wordpress.org/?v=3.4 Comment on Building Mobile Apps with Jo by vijay kumar pandray /index.php/2011/01/02/building-mobile-apps-with-jo/#comment-13002 vijay kumar pandray Sat, 08 Jan 2011 17:21:04 +0000 /?p=108#comment-13002 hi stuart ...its very good :)...great hi stuart …its very good :)…great

]]>
Comment on How to create a PHP web template – Part 1 by pkay /index.php/2010/12/28/how-to-create-a-php-web-template-part-1/#comment-12992 pkay Tue, 04 Jan 2011 23:34:02 +0000 /?p=74#comment-12992 PHP does not have a compiler, it uses a interpreter. You need to install PHP and have web server configured to talk to PHP. PHP does not have a compiler, it uses a interpreter. You need to install PHP and have web server configured to talk to PHP.

]]>
Comment on Serious Flash Alternative using CSS3? by andy /index.php/2011/01/01/serious-flash-alternative-using-css3/#comment-12991 andy Tue, 04 Jan 2011 10:31:52 +0000 /?p=99#comment-12991 I wonder how much they will charge once it's out of beta. looks awesome though! I wonder how much they will charge once it’s out of beta.
looks awesome though!

]]>
Comment on How to create a PHP web template – Part 1 by Chime /index.php/2010/12/28/how-to-create-a-php-web-template-part-1/#comment-12974 Chime Thu, 30 Dec 2010 02:38:25 +0000 /?p=74#comment-12974 u did well, i'm a beginner n i'ld lik to knw if i need a php compiler before working with it. i use 7. u did well,
i’m a beginner n i’ld lik to knw if i need a php compiler before working with it. i use 7.

]]>
Comment on Advanced JavaScript Lessons for the 21st Century by lokendra kumar /index.php/2008/10/13/advanced-javascript-lessons-for-the-21st-century/#comment-12896 lokendra kumar Thu, 24 Jun 2010 10:23:14 +0000 /?p=46#comment-12896 How I have done!..........This I have two Combo - One for Country and one for City On county combo i have called this function........ onchange="CityListOnChange(this.value) function CreateXmlHttp() { try { XmlHttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { XmlHttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (e2) { try { XmlHttp = new XMLHttpRequest(); } catch (e3) { xhr = false; } } } } function CityListOnChange(ID) { removeOptionLast(); //debugger ; //var countryList = document.getElementById("SlCity"); // var selectedCity = countryList.options[countryList.selectedIndex].value; var requestUrl = "Ajax.aspx" + "?SelectedCountry=" +ID ; // + encodeURIComponent(selectedCountry); // Ajax.aspx is the page from where i get the data by database CreateXmlHttp(); if(XmlHttp) { //debugger; XmlHttp.onreadystatechange = HandleResponse; XmlHttp.open("GET", requestUrl, true); XmlHttp.send(null); } } function HandleResponse() { //debugger ; if(XmlHttp.readyState == 4) { if(XmlHttp.status == 200) { // var responseData = XmlHttp.responseXML; //responseData.childNodes[0].childNodes[0].childNodes.length // debugger ; //if(responseData !=null) if(responseData.childNodes.length >0) for ( i =0; i< responseData.childNodes[0].childNodes.length;i++) { var elOptNew = document.createElement('option'); elOptNew.value = responseData.childNodes[0].childNodes[i].childNodes[0].text; elOptNew.text = responseData.childNodes[0].childNodes[i].childNodes[1].text; var elSel = document.getElementById('SelCity'); elSel.options.add(elOptNew); } // ClearAndSetStateListItems(XmlHttp.responseXML.documentElement); } else { alert("There was a problem retrieving data from the server." ); } } } //on Ajax.aspx --- I have done this........... if(!IsPostBack ) { if (Request["SelectedCountry"].ToString() == "IN") { Response.Clear(); string XMLString; //CountryStateXml countryStateXml = new CountryStateXml(); // string statesString = countryStateXml.GetStatesXMLString(selectedCountry); XMLString = ds.GetXml(); Response.Clear(); Response.ContentType = "text/xml"; Response.Write(XMLString); Response.End(); } else { //clears the response written into the buffer and end the response. Response.Clear(); Response.End(); } } //////////////////// Happy programing How I have done!……….This
I have two Combo – One for Country and one for City
On county combo i have called this function……..
onchange=”CityListOnChange(this.value)
function CreateXmlHttp()
{

try { XmlHttp = new ActiveXObject(‘Msxml2.XMLHTTP’); }
catch (e)
{
try { XmlHttp = new ActiveXObject(‘Microsoft.XMLHTTP’); }
catch (e2)
{
try { XmlHttp = new XMLHttpRequest(); }
catch (e3) { xhr = false; }
}
}
}

function CityListOnChange(ID)
{
removeOptionLast();
//debugger ;
//var countryList = document.getElementById(“SlCity”);
// var selectedCity = countryList.options[countryList.selectedIndex].value;
var requestUrl = “Ajax.aspx” + “?SelectedCountry=” +ID ;
// + encodeURIComponent(selectedCountry);
// Ajax.aspx is the page from where i get the data by database
CreateXmlHttp();
if(XmlHttp)
{
//debugger;
XmlHttp.onreadystatechange = HandleResponse;
XmlHttp.open(“GET”, requestUrl, true);
XmlHttp.send(null);
}
}

function HandleResponse()
{
//debugger ;
if(XmlHttp.readyState == 4)
{
if(XmlHttp.status == 200)
{
//
var responseData = XmlHttp.responseXML;

//responseData.childNodes[0].childNodes[0].childNodes.length
// debugger ;
//if(responseData !=null)
if(responseData.childNodes.length >0)
for ( i =0; i< responseData.childNodes[0].childNodes.length;i++)
{
var elOptNew = document.createElement(‘option’);
elOptNew.value = responseData.childNodes[0].childNodes[i].childNodes[0].text;

elOptNew.text = responseData.childNodes[0].childNodes[i].childNodes[1].text;
var elSel = document.getElementById(‘SelCity’);
elSel.options.add(elOptNew);
}
// ClearAndSetStateListItems(XmlHttp.responseXML.documentElement);
}
else
{
alert(“There was a problem retrieving data from the server.” );
}
}
}

//on Ajax.aspx — I have done this………..

if(!IsPostBack )
{

if (Request["SelectedCountry"].ToString() == “IN”)
{

Response.Clear();
string XMLString;
//CountryStateXml countryStateXml = new CountryStateXml();
// string statesString = countryStateXml.GetStatesXMLString(selectedCountry);
XMLString = ds.GetXml();
Response.Clear();
Response.ContentType = “text/xml”;
Response.Write(XMLString);
Response.End();

}
else
{
//clears the response written into the buffer and end the response.
Response.Clear();
Response.End();
}
}

//////////////////// Happy programing

]]>