There is an example on w3schools in which Ajax Suggest Code is given.
Following files are used for said example....
1. One HTML file.
2. A Java Script File
3. An ASP file which contains suggestions in an array.
From this asp file they are trying to fetch Suggestions as per key is pressed.
After i followed all the instructions,
problem is that whenever i type any alphabet, whole ASP code is getting attached
with suggestion area.
And i've also tried with PHP file instead of ASP but still, result is same.......
You can't do that with ASP. If you want to serve ASP, you'll need to set up an ASP server. Plain and simple. No other way around it.
If you want to serve a static file, you'll need to create a text file with the static text that you want returned. No ASP. No PHP. No code of any type. Just text.
Bear Bibeault wrote:You can't do that with ASP. If you want to serve ASP, you'll need to set up an ASP server. Plain and simple. No other way around it.
If you want to serve a static file, you'll need to create a text file with the static text that you want returned. No ASP. No PHP. No code of any type. Just text.
Now i'm using JSP instead of ASP or PHP and these files are put inside eclipse project.
Now i'm getting what is expected....
But my new question is....
As we are returning the responseText in this Javascript Function....
Is there such rule in AJAX that the responseText will be returned only once...??
I mean if i want to return Multiple results as various responseText....
Can we do that?