Ajax pada Webworks Blackberry


Method get pada JQLite dilakukan dengan cara sebagai berikut :

jQuery.ajax.send("content.html", function(data, status) {
alert(data);
});

Hal ini akan menghasilkan result yang sama dengan cara tradisional:


Insert title here
function startajax(){
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","content.html",true);
xmlhttp.onreadystatechange=function(event){
if(xmlhttp.readyState==4){
alert(xmlhttp.responseText);
}
};
xmlhttp.send(null);
}
function update(){
if(xmlhttp.readyState==4){
alert(xmlhttp.responseText);
}
}

Hello World


About abunajiyah
A Programmer

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: