Hi all,
I have a problem with JavaScript embedded in my AJAX response.
I have declared a Javascript variable "test" in my AJAX response. I am also creating a button in the response. On clicking this button, I want to alert "test".
I get the response correctly. I verified this using Firebug. However, when I click on the button, I get an error message "test is undefined". Any idea why this would happen?
I tried using
e v a l()
as suggested in another
thread here, but that did not seem to work either.
Do I need to set the response type to anything specific?
Am I missing something here?
Any help would be appreciated.
This is my HTML code
This is my
servlet code ....