hi frnds,
Is Ajax can only used as xmlhttp or else it can use for
anyother purpose,
If any sample example code for that, plz reply to me soon.
Thanks
Dinesh B... 9 1658 ba************* ****@gmail.com wrote:
Is Ajax
Nasty, and poorly understood, buzzword
can only used as xmlhttp or else it can use for
anyother purpose,
XMLHttpRequest is /how/ Ajax is usually achieved, it isn't the purpose
of the technique.
Alternatives include frames, iframes, and passing data through the
query strings of images. ba************* ****@gmail.com skrev:
hi frnds,
Is Ajax can only used as xmlhttp or else it can use for
anyother purpose,
If any sample example code for that, plz reply to me soon.
Her is a simple AJAX Tutorial: http://www.w3schools.com/ajax/
You may want to ad support for IE when using the XMLHttpRequest Object:
function GetXmlHttpObjec t(handler)
{
var objXMLHttp=null
// Firefox, Opera 8.0+, Safari
if (window.XMLHttp Request)
{
objXMLHttp=new XMLHttpRequest( )
}
// Internet Explorer
else if (window.ActiveX Object)
{
objXMLHttp=new ActiveXObject(" Microsoft.XMLHT TP")
}
return objXMLHttp
} ba************* ****@gmail.com wrote:
hi frnds,
Is Ajax can only used as xmlhttp or else it can use for
anyother purpose,
If any sample example code for that, plz reply to me soon.
Thanks
Dinesh B...
You don't have to use xml to pass data back and forth if that was your
question but otherwise xmlhttp IS Ajax. Another page linked to the w3
tutorials, I'll link you to mine since it shows how to pass data with
iframes in addition to ajax. (warning: self promoting link) http://www.hunlock.com/blogs/AJAX_for_n00bs
Cheers.
-- http://www.hunlock.com -- Musings in Javascript, CSS.
$FA
Roy A. said the following on 1/8/2007 8:47 AM:
ba************* ****@gmail.com skrev:
>hi frnds,
Is Ajax can only used as xmlhttp or else it can use for anyother purpose, If any sample example code for that, plz reply to me soon.
Her is a simple AJAX Tutorial: http://www.w3schools.com/ajax/
You may want to ad support for IE when using the XMLHttpRequest Object:
Someone might want to tell w3schools to test the code in IE7.
function GetXmlHttpObjec t(handler)
{
var objXMLHttp=null
// Firefox, Opera 8.0+, Safari
And IE7
if (window.XMLHttp Request)
{
objXMLHttp=new XMLHttpRequest( )
}
// Internet Explorer
IE version 6 and prior.
else if (window.ActiveX Object)
{
objXMLHttp=new ActiveXObject(" Microsoft.XMLHT TP")
And if the IE browser doesn't use/have Microsoft.XMLHT TP? Another reason
I find the level of script tutoring at w3schools to be questionable at best.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
David Dorward said the following on 1/8/2007 6:20 AM:
ba************* ****@gmail.com wrote:
> Is Ajax
Nasty, and poorly understood, buzzword
>can only used as xmlhttp or else it can use for anyother purpose,
XMLHttpRequest is /how/ Ajax is usually achieved, it isn't the purpose
of the technique.
Alternatives include frames, iframes, and passing data through the
query strings of images.
And dynamically loading .js files :)
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Randy Webb skrev:
Someone might want to tell w3schools to test the code in IE7.
function GetXmlHttpObjec t(handler)
{
var objXMLHttp=null
// Firefox, Opera 8.0+, Safari
And IE7
if (window.XMLHttp Request)
{
objXMLHttp=new XMLHttpRequest( )
}
// Internet Explorer
IE version 6 and prior.
else if (window.ActiveX Object)
{
objXMLHttp=new ActiveXObject(" Microsoft.XMLHT TP")
And if the IE browser doesn't use/have Microsoft.XMLHT TP? Another reason
I find the level of script tutoring at w3schools to be questionable at best.
Yes, IE7 XMLHttpRequest may and are probably implemented diffrent than
the other browsers. However, the object instance objXMLHttp is used in
the same way for both XMLHttpRequest and XMLHTTP, and it seems to
confirm with the working draft of W3C; http://www.w3.org/TR/XMLHttpRequest. But, I agree, the comment could
sugest that it haven't been tested.
The XMLHttpRequest is just one example of AJAX without XMLHTTP.
Roy A. said the following on 1/9/2007 7:11 AM:
<snip>
Yes, IE7 XMLHttpRequest may and are probably implemented diffrent than
the other browsers.
Yes it is. IE7 uses a native object instead of an ActiveX object for the
XMLHttpRequest.
However, the object instance objXMLHttp is used in
the same way for both XMLHttpRequest and XMLHTTP, and it seems to
confirm with the working draft of W3C; http://www.w3.org/TR/XMLHttpRequest. But, I agree, the comment could
sugest that it haven't been tested.
The XMLHttpRequest is just one example of AJAX without XMLHTTP.
Think about what that line says.
XMLHttpRequest without XMLHTTP?
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
On Tue, 09 Jan 2007 09:58:57 -0500, Randy Webb wrote:
Roy A. said the following on 1/9/2007 7:11 AM:
<snip>
>Yes, IE7 XMLHttpRequest may and are probably implemented diffrent than the other browsers.
Yes it is. IE7 uses a native object instead of an ActiveX object for the
XMLHttpRequest.
>However, the object instance objXMLHttp is used in the same way for both XMLHttpRequest and XMLHTTP, and it seems to confirm with the working draft of W3C; http://www.w3.org/TR/XMLHttpRequest. But, I agree, the comment could sugest that it haven't been tested.
The XMLHttpRequest is just one example of AJAX without XMLHTTP.
Think about what that line says.
XMLHttpRequest without XMLHTTP?
As has already been mentioned the term AJAX implies the use of XML, but
it's sometimes a little fickle in my experience. Perhaps Roy made a typo
and intended to reference "http.responseT ext" instead of "XMLHTTPRequest ".
I always seem to run into small snags with XML and have resorted to using
simple character-delimited lists, when my problem domain doesn't require
anything more sophisticated. Here's an example of that, where my data page
will return a pipe-delimited list with 3 elements. For example:
"112197|1.46962 48|0.5309032" which is the primary key of my record,
longitude, and latitude.
Even though this is a bastardization of "AJAX" it works well and saves me
a lot of headache.
RESPONSE HANDLER:
function useHttpResponse () {
if (http.readyStat e == 4) {
if(http.status == 200) {
if ( http.responseTe xt.length ) {
var aLong = http.responseTe xt.split('|'); lngPtr =
document.getEle mentById(longAm t); latPtr =
document.getEle mentById(latAmt ); lngPtr.value = aLong[1];
latPtr.value = aLong[2];
}
}
}
}
DATA PAGE:
<?php
// include db and query components
require_once("q ryMySQLConn.php ");
require_once("q ryDataUDF.php") ;
$rsZipDtl = getZipDetail($_ GET[userString]); if ( $rsZipDtl ) {
for ($i=0; $i<mysql_num_ro ws($rsZipDtl); $i++) {
$ntRowObj = mysql_fetch_obj ect($rsZipDtl); if($i) {
$cLineStr = "~";
}
else {
$cLineStr = "";
}
$cLineStr =
$cLineStr."$ntR owObj->zipID|$ntRowOb j->zipRLongitude| $ntRowObj->zipRLatitude ";
}
}
echo($cLineStr) ;
?>
Randy Webb wrote:
Roy A. said the following on 1/9/2007 7:11 AM:
<snip>
Yes, IE7 XMLHttpRequest may and are probably implemented diffrent than
the other browsers.
Yes it is. IE7 uses a native object instead of an ActiveX object for the
XMLHttpRequest.
However, the object instance objXMLHttp is used in
the same way for both XMLHttpRequest and XMLHTTP, and it seems to
confirm with the working draft of W3C; http://www.w3.org/TR/XMLHttpRequest. But, I agree, the comment could
sugest that it haven't been tested.
The XMLHttpRequest is just one example of AJAX without XMLHTTP.
Think about what that line says.
XMLHttpRequest without XMLHTTP?
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
As has already been mentioned the term AJAX implies the use of XML, but
it's sometimes a little fickle in my experience. Perhaps Roy made a
typo and intended to reference "http.responseT ext" instead of
"XMLHTTPRequest ".
I always seem to run into small snags with XML and have resorted to
using simple character-delimited lists, when my problem domain doesn't
require anything more sophisticated. Here's an example of that, where
my data page will return a pipe-delimited list with 3 elements. For
example: "112197|1.46962 48|0.5309032" which is the primary key of my
record, longitude, and latitude.
Even though this is a bastardization of "AJAX" it works well and saves
me a lot of headache.
RESPONSE HANDLER:
function useHttpResponse () {
if (http.readyStat e == 4) {
if(http.status == 200) {
if ( http.responseTe xt.length ) {
var aLong = http.responseTe xt.split('|');
lngPtr = document.getEle mentById(longAm t);
latPtr = document.getEle mentById(latAmt );
lngPtr.value = aLong[1];
latPtr.value = aLong[2];
}
}
}
}
DATA PAGE:
<?php
// include db and query components
require_once("q ryMySQLConn.php ");
require_once("q ryDataUDF.php") ;
$rsZipDtl = getZipDetail($_ GET[userString]);
if ( $rsZipDtl ) {
for ($i=0; $i<mysql_num_ro ws($rsZipDtl); $i++) {
$ntRowObj = mysql_fetch_obj ect($rsZipDtl);
if($i) {
$cLineStr = "~";
}
else {
$cLineStr = "";
}
$cLineStr =
$cLineStr."$ntR owObj->zipID|$ntRowOb j->zipRLongitude| $ntRowObj->zipRLatitude ";
}
}
echo($cLineStr) ;
?> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: matt.delvecchio |
last post by:
hello,
im working on my first production AJAX project, and im noticing
something weird.
when my clientside events fire (user clicks on various product rows), i
make an xmlhttp call. in this call i hit a URL and pass it the clicked
productID, such as: "/ajax/productDetail.aspx?pid=666666". this page
produces XML direct from the database and i render it onscreen. cool.
|
by: trpost |
last post by:
How can I accomplish the following using AJAX / PHP:
I have a form with a text field and a search button next to the text
field. When I type something in the text field and hit the search
button a query is performed and the results are dynamically entered
into a multiple select box below the textfield without reloading the
page, or affecting other form elements. If no data is found then an
error message is displayed in place of the...
|
by: ak1dnar |
last post by:
Hi i need to download some files (.pdf/.doc) from web root.
I am using a ajax script to send the file IDs and PHP will process it and it should generate the save as dialog box.
Currently without ajax when i process PHP file i can open the download box to save the file.
example:
http://localhost/website/download.php?fid=1005
but when i am sending the fid (using a onclick event of a Image i am sending the ID to JS func ) through Ajax...
|
by: Sommer.pde |
last post by:
It took me some time to find out when and why this happens.
When the window of Internet Explorer is closed with an AJAX call still
pending, something funny happens. Do it twice, and you will have to
restart the browser.
Here a little sample: http://truefriendz.de/iedos
The script on this site will open 5 test-windows one at a time.
|
by: Arjen |
last post by:
Hi,
I want to reload 2 divs at one click. Ive tried:
<a href = "javascript:void(0);"
onclick="show('ajaxrequest.php?action=removefield','div1');show('ajaxrequest.php?action=reloaddiv2','div2')">verwijderen</a>
While both seperate actions work they dont when I put them together.
Anyone know how to fix this ?
My ajax.js with funcition show
| |
by: rpollard |
last post by:
Hi,
I am relatively new to Ajax and am wondering if someone can shed a bit of light on the conceptual part of how Ajax handles its communication.
Not knowing a whole lot about Ajax when I started coding I copied some code from the Internet that seem to be the accepted way of creating the object and using it.
This is the code I am using on the Javascript side:
------------------------------------------------------------------------
var...
|
by: dmorand |
last post by:
I'm having a little trouble with my ajax. I can see my results in IE, but not firefox. I'm assuming I'm missing some syntax somewhere.
alert("Test " + results + testing); returns the values in IE, but in Firefox it says undefined
Any ideas why this can happen?
<cfform action="" enablecab="Yes" onSubmit="formSubmission();">
<table align="center">
<tr><td>ICU Capacity:</td><td><cfoutput query="GetConstants"><input...
|
by: sid0404 |
last post by:
Hi
I need to send data from my servlet to my html(which contains AJAX), so as per the motivation of the AJAX, this should be done without my webpage reloading / refresh.
my code on the ajax side is something like this:
var xmlHttp = false;
function getXMLHttpRequest(val) {
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |