Quote:
Originally Posted by devnull69
CASE 2 should be the correct one ... you should continue from there and debug
1. Is the function actually being called?
2. Does it start the Ajax request
3. Does the Ajax request return with the correct result
4. Does the confirm() come up
5. Finally: Does the .submit() actually do anything?
Right now, obviously it doesn't reach step 5 ... but you can only find out through debugging
|
Answers to your questions.
1) Yes, the function has been called.
2) Ajax request started and getting correct result from AJAX request.
3) Confirm message is coming up.
4) Then if i press "OK", the page gets refreshed but no post submission task executes. If i press "Cancel", nothing happens.
I tried to debug and found the followings.
1) In a normal submission process [without using return false in onclick] the form gets submitted. And the url is:
http://abc.com/abc.php?InterestedUse...=&btn_submit=#
2) While using return false in onclick and after confirming "ok" , i found the following url
http://abc.com/abc.php?InterestedUse...=172&ItemId31=
where
btn_submit= is missing.
I am processing the post submission query using the following code:
if(isset($_REQUEST['btn_submit']))
{
...
...
}
Now, as $_REQUEST['btn_submit'] is absent in the url, the page does not process post submission task.
I tried to modify the
document.getElementById('accept_offer'+count_number).submit(); by
document.getElementById('btn_submit').click(); but did not succeed. This time , the confirm message comes out whenever i am clicking on "OK".