471,316 Members | 1,342 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,316 software developers and data experts.

AJAX XML feeds via Web Service

So ajax is the new black, i've had a couple ideas about how to
implement it. I've alook at ajax.net and few other implementations but
to me they're a bit complex. Maybe it's the way to go to have better
coding.

In the standard case of a dropdownlist, or listbox, that needs to be
filled as the user types (aka google suggest), i thought it might be
best handle the following way.

javascript engine <-> xml request <-> asp.net web service (returns xml)
<-> database

Your javascript engine gets an xml feed from the web service (makes
your javascript engine non-asp.net sepific), and your web service acts
as a layer between your data and the UI. The javascript engine fills
the dropdownlist with the returned xml feed.

Is this the wrong way to picture a AJAX asp.net world? Is it better to
implement an ajax.net style solution?
thanks for the ideas

Nov 19 '05 #1
2 1620
this is correct. the problem is doing the httprequest and parsing the xml
from javascript. this is not built into the language but supplied by the
browser (maybe).

there are two ways to do the request

1) use a iframe with a form and do a submit, or set the src with the
parametes passed on the url
2) use the XMLHTTP component (if it exists). this component started with IE,
but has been added to firefox and other browsers. actually with firefox and
safari, it support webservice calls directly. in IE security settings may
prevent it from running.

then the javascript need to parse the response. there are several options

1) if iframe, render hidden fields with values
2) use XMLHTTP to parse xml response
3) use eval to excute a javascript statement that set the values
4) write javascript code to parse the xml.

it is also possible to use SOAP. for IE use the web behavior, and for others
use the builtin SOAP support.
-- bruce (sqlwork.com)



<sh**********@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
So ajax is the new black, i've had a couple ideas about how to
implement it. I've alook at ajax.net and few other implementations but
to me they're a bit complex. Maybe it's the way to go to have better
coding.

In the standard case of a dropdownlist, or listbox, that needs to be
filled as the user types (aka google suggest), i thought it might be
best handle the following way.

javascript engine <-> xml request <-> asp.net web service (returns xml)
<-> database

Your javascript engine gets an xml feed from the web service (makes
your javascript engine non-asp.net sepific), and your web service acts
as a layer between your data and the UI. The javascript engine fills
the dropdownlist with the returned xml feed.

Is this the wrong way to picture a AJAX asp.net world? Is it better to
implement an ajax.net style solution?
thanks for the ideas

Nov 19 '05 #2
Hy guys!
I just want to share that there are great online tutorials about ajax parsing xml at www.KYNOU.com.
You can find by searching for it (the website is like a search engine but just for tutorials) or you can go right into the Newest Tutorials link.
I hope this helps :)
May 10 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Steve | last post: by
3 posts views Thread by Bevo | last post: by
5 posts views Thread by lucyh3h | last post: by
2 posts views Thread by kpg | last post: by
9 posts views Thread by Trapulo | last post: by
7 posts views Thread by =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post: by
2 posts views Thread by tshad | last post: by
6 posts views Thread by Scott M. | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.