riffla
03-20-2009, 09:19 AM
Hi
Need some help/advice here from someone familiar with Ajax
I have a Jsp/Servlet aplication in which there is a scenario where the user will select, lets say a category, from a select box. This triggers a javascript which makes an Ajax request to a servlet returning all sub categories related to the selected category. As it is right now, I'm returning the complete HTML code that renders the sub category select element (upon request completion there is a Prototype update of a div that inserts the response - new sub category select element), and it shows up just fine in the JSP page. But the strange thing is that it doesn't show up when I View Source. In other words it seems like that select element won't be a part of forthcoming submits.
A guess is that I need to create a DOM element and add it to the form in javascript, but I I'm not sure at all.
/R
Need some help/advice here from someone familiar with Ajax
I have a Jsp/Servlet aplication in which there is a scenario where the user will select, lets say a category, from a select box. This triggers a javascript which makes an Ajax request to a servlet returning all sub categories related to the selected category. As it is right now, I'm returning the complete HTML code that renders the sub category select element (upon request completion there is a Prototype update of a div that inserts the response - new sub category select element), and it shows up just fine in the JSP page. But the strange thing is that it doesn't show up when I View Source. In other words it seems like that select element won't be a part of forthcoming submits.
A guess is that I need to create a DOM element and add it to the form in javascript, but I I'm not sure at all.
/R