cancer10
06-25-2008, 06:33 AM
Hi,
I am trying to learn ajax with jquery.
The following code is a simple ajax script that sends the values for 3 fields to another page search.php.
<script type="text/javascript">
var http = false;
if(navigator.appName == "Microsoft Internet Explorer") {
http = new ActiveXObject("Microsoft.XMLHTTP");
} else {
http = new XMLHttpRequest();
}
var strkeyword= document.forms['myform'].txtKeyword.value;
var strdomain= document.forms['myform'].txtDomain.value;
var strengine = document.forms['myform'].txtEngine.value;
http.abort();
http.open("GET", "search.php?keyword="+ strkeyword +"&domain=" + strdomain + "&engine=" + strengine, true);
http.onreadystatechange=function() {
</script>
Now question: Can this script be written in jQUERY? if yes how?
I search on the jquery site but could not find anything that can help me.
Thanx
I am trying to learn ajax with jquery.
The following code is a simple ajax script that sends the values for 3 fields to another page search.php.
<script type="text/javascript">
var http = false;
if(navigator.appName == "Microsoft Internet Explorer") {
http = new ActiveXObject("Microsoft.XMLHTTP");
} else {
http = new XMLHttpRequest();
}
var strkeyword= document.forms['myform'].txtKeyword.value;
var strdomain= document.forms['myform'].txtDomain.value;
var strengine = document.forms['myform'].txtEngine.value;
http.abort();
http.open("GET", "search.php?keyword="+ strkeyword +"&domain=" + strdomain + "&engine=" + strengine, true);
http.onreadystatechange=function() {
</script>
Now question: Can this script be written in jQUERY? if yes how?
I search on the jquery site but could not find anything that can help me.
Thanx