Hi I am trying a Simple Ajax Example of Populating a DropDown depending upon the value selected.... It looks pretty Starighforward.. I did most of the changes since last couple of day ....but still not able to identify the problem yet....
This is my JS Code
My HTML CODE
Any Help would be appreciated I am clueless that why I am not getting the XML request Back the code looks ok to me ... even the content type is set to text/xml
Please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.
You can go back and change your post to add code tags by clicking the button on your post.
For some unfathomable reason you are outputting that data from Java scriptlets in a JSP. It would have been much simpler to just use a servlet containing that code. But more to the point, since it's a JSP maybe the container sensibly assumes you're going to use it to output HTML and therefore sets the content type to text/html? At any rate you should check at the client end to see what content type you are actually getting.
thanks for the updates .. I would write a servlet and check it ... apart from that do you see any issues in the code or it is just the container which is setting the output back to html.... is there any way where in we can enforce this behaviour through servlet as I have already set the content type in the JSP
I just looked in the genertated class and here it is .... it sets the content type back to html
Is there any other way in which we can achieve this is JSP ?