Is this AJAX? (Sort of "Off Topic")

B

blueapricot416

I have some javascript in a standard HTML page that uses the ubiquitous
"XMLHttpRequest" to send data to a remote ASP page.

If that page "answers back" by sending a string using a simple
Response.Write, which I then use in the original HTML page to
dynamically update stuff, is this "AJAX"?

Specifically, is there anything "wrong" with sending back info from
classic ASP pages using simple Response.Writes? (Is there usually
something more required in the "answer back"? Or something that
Response.Write might not be sending, like an appropriate header "AJAX"
header?)

I mean, what I have done works! -- so I wonder if I am missing
something? It seems so easy to do -- I _MUST_ be missing something?
Right?

Thanks,
Blue Apricot
PS: Sorry about an "off topic" post, but I figured there would be some
AJAX experts here...
 
J

Joerg Jooss

Thus wrote (e-mail address removed),
I have some javascript in a standard HTML page that uses the
ubiquitous "XMLHttpRequest" to send data to a remote ASP page.

If that page "answers back" by sending a string using a simple
Response.Write, which I then use in the original HTML page to
dynamically update stuff, is this "AJAX"?

It's Asynchronous, it's JavaScript, And it uses XMLHTTPRequest -- yes, that's
pretty much it.
Specifically, is there anything "wrong" with sending back info from
classic ASP pages using simple Response.Writes? (Is there usually
something more required in the "answer back"?

Wrong? No. It's probably neither the ideal component type nor the ideal technology,
but if it works for you...
Or something that
Response.Write might not be sending, like an appropriate header "AJAX"
header?)

There's really no such thing like an "AJAX protocol" -- what's being sent
back over the wire can be whatever works best for you, or whatever you need
to interoperate with: SOAP, POX, JSON, or raw text.
I mean, what I have done works! -- so I wonder if I am missing
something? It seems so easy to do -- I _MUST_ be missing something?

Don't forget that your current scenario was kind of thankful. It seems you
didn't have to deal with cross-browser compatibility issues, or more advanced
integration scenarios like pulling data from a Web service. You also didn't
need to integrate your approach with ASP.NET's page model. Things can get
bit more interesting if you're facing such issues. That's why you rather
want to use a good ASP.NET AJAX framework instead of making up your own.

Cheers,
 
C

Chris Fulstow

Hi,

I don't see anything wrong with what you've done, you can pass anything
you like back to your page. It's more conventional to send back XML
because it's more flexible and isn't tied to any sort of presentation,
but whatever works for you.

There are a few AJAX frameworks available for ASP.NET now like Ajax.NET
and Atlas, which might be useful if you want to get more involved with
AJAX.

Chris
 
G

Guest

"AJAX" confuses the landscape as an acronym (Remote scripting is more
appropriate IMHO, but hey, that's progress I guess) because almost nobody
uses XML with it. What you are doing is certainly Remote Scripting. If you
like what you are doing, then look at some of the better "AJAX"
implementations for .NET such as Anthem.Net, MagicAjax (both open source on
Sourceforge.net) or of course, ATLAS.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,096
Latest member
ThurmanCre

Latest Threads

Top