AJAX (javascript help) - ASP.NET(C#)

T

Trip

Please if someone can help me !!!

I need client and server code(principle based on AJAX) for next problem:

i have 3 <select> tags on html page.(it must be NO page reload(callback)
only select(controles) regeneration !!!)
In the first <select> goes countries, which must be pulled from some kind
of database (whichever you want).
after that if i select some country, second <select> must be filled with
regions of that country, and when i select some region than third <select>
must be filled with cities from that region.

conclusion: i need javascript code for html document and server .net code
which returns data based on xmlhttp request object which i send to him.

comment: please don't send links to other sites which has some solution
based on .net wrappers, or php/JAVA code !!! It's doesn't help me - I need
exactly what i wrote.
 
R

Randy Webb

Trip said the following on 10/2/2005 11:06 AM:
Please if someone can help me !!!

I need client and server code(principle based on AJAX) for next problem:

Why based on "AJAX"? I can think of better solutions that are more
widely supported.
i have 3 <select> tags on html page.(it must be NO page reload(callback)
only select(controles) regeneration !!!)

OK, then don't reload the page.
In the first <select> goes countries, which must be pulled from some kind
of database (whichever you want).
after that if i select some country, second <select> must be filled with
regions of that country, and when i select some region than third <select>
must be filled with cities from that region.

Easy enough. Search the archives for dynamically loading .js files on
the fly. There is a ton of code there (about half written by me) that
will load a .js file on the fly and from there you can populate select
lists. The URL you may run across that points to hikksworld.com does not
exist anymore though.
conclusion: i need javascript code for html document and server .net code
which returns data based on xmlhttp request object which i send to him.

Your conclusion is flawed. You are chosing to use the xmlhttp request
object, you are not required to use it.

This site which is not even close to finished and/or working:

<URL: http://members.aol.com/justhikk/index.html >

Does basically what you are wanting to do, and it does nothing more than
load .js files dynamically. And it does not have any of this "AJAX" in
it. Nor does it reload the page.
comment: please don't send links to other sites which has some solution
based on .net wrappers, or php/JAVA code !!! It's doesn't help me - I need
exactly what i wrote.

While you can try, and ignore those responses, do not attempt to limit
the solutions offered to you. This is Usenet. You ask a question, the
answers you get may or may not be what you *want* but they will be the
responses you get.
 
T

Trip

Thank you!!

p.s.i did't want to be rude.


Trip said the following on 10/2/2005 11:06 AM:


Why based on "AJAX"? I can think of better solutions that are more
widely supported.


OK, then don't reload the page.


Easy enough. Search the archives for dynamically loading .js files on
the fly. There is a ton of code there (about half written by me) that
will load a .js file on the fly and from there you can populate select
lists. The URL you may run across that points to hikksworld.com does not
exist anymore though.


Your conclusion is flawed. You are chosing to use the xmlhttp request
object, you are not required to use it.

This site which is not even close to finished and/or working:

<URL: http://members.aol.com/justhikk/index.html >

Does basically what you are wanting to do, and it does nothing more than
load .js files dynamically. And it does not have any of this "AJAX" in
it. Nor does it reload the page.


While you can try, and ignore those responses, do not attempt to limit
the solutions offered to you. This is Usenet. You ask a question, the
answers you get may or may not be what you *want* but they will be the
responses you get.
 
T

Trip

Thank you!!!

Trip said:
I need client and server code(principle based on AJAX) for next problem:

i have 3 <select> tags on html page.(it must be NO page reload(callback)
only select(controles) regeneration !!!)
In the first <select> goes countries, which must be pulled from some kind
of database (whichever you want).
after that if i select some country, second <select> must be filled with
regions of that country, and when i select some region than third <select>
must be filled with cities from that region.

conclusion: i need javascript code for html document and server .net code
which returns data based on xmlhttp request object which i send to him.

I have a jsXMLlib.js , based on XMLHTTP with support for
NS,IE,Firefox,Opera etc. It allows you to load and read XML files
on the fly. It also has a user defined callback mechanism that gets
called when the data is ready. It also allows as many instances as your
browser can support. In your page it would look something
like this pseudo code.


<select name="countries">
onChange="new DCxml(.....,fnPopulateRegion)"></select>
<select name="region">
onChange="new DCxml(.....,fnPopulateCities)"></select>
<select name="cities"
onChange="youlivehere()"></select>

new DCxml("countries.xml",fnPopulateCountries)


You can find this library and it's relatives in the .zip
file which can be found at http://www.drclue.net/projects/jsDHTMLlib
under the [files] tab.

Hope that helps
 

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,776
Messages
2,569,603
Members
45,200
Latest member
LaraHunley

Latest Threads

Top