i have a page.jsp, this page have a checkbox, when tick on checkbox, it prompt a popup window and this popup window allow user enter password in order to further proceed, if popup window enter wrong password, it should display error message in popup window, if correct password , it will close the popup window and checkbox ticked
the popup window is construct as follow :
when i enter correct password or incorrect password , it doesn't prompt the error message but does return the whole xml file and replaced the popup window, can i know which part i have done wrong ?
below is part of action
thank you for guidance [ November 07, 2006: Message edited by: Nakata kokuyo ]
Joined: Apr 13, 2005
hi all , after i change this part
i can see that function initRequest() is called but not function properly, may be it doesn't create the Ajax.Request object, i'm not sure on this ..can someone guide me how to further debug ?
I haven't used the script.aculo.us Ajax prototype, so I couldn't help you much on this.
I did find this link that might be useful to you. One thing you might try is adding a postBody to your options to set the value of the user name and password. Remember this is an AJAX call, so input fields are not automatically included as parameters. You have to explicitly include them in the URL. Also, if I'm reading the documentation correctly, you should be using onSuccess instead of onComplete.
the code is work if i put it into normal page(at least the function in action is called) but not in popup window page.
i wondering do we call the ajax function in popup window with same way as what we did in normal page ?
Joined: Feb 15, 2005
AJAX doesn't work any differently in a popup window than in a regular window. There has to be some difference in your code or in the environment. I'm wondering if you forgot to include the definition of the script.aculo.us library in the popup window.
Joined: Apr 13, 2005
thank you Merrill Higginson for the hints, i really did a stupid and unforgiven mistake where i didn't import the source for js file properly, it solved now