![]() |
Returning Correct Content
Hey,
Am a bit stuck, though nothing major, hope I can get some assistance. Can I show you these four functions: Code:
function updateForm(element, msg) {Code:
<form action="configs/ajax_functions.php?settings=password" method="post" id="passwordSecurity" onsubmit="checkPass(this); updateSpryForm(this, 'Your password was changed. You have been logged out, please log back in with your new password', false); return false">Urm, hope I made sense, and didn't boggle you with too much code. Look forward to a response. |
Hi, try this function (add it with your others):
Code:
function validate()Code:
onsubmit="validate(); return false;"Code:
function checkPass(element) { |
Hey,
I tried your method: Code:
function checkPass(element) { |
Hi there, sorry, made a stupid mistake, ammend the function like this:
Code:
function validate(pForm)Code:
onsubmit="validate(this); return false;" |
Hey,
That did indeed sort out that problem... I thought it might be that, but didn't have time to check it out last night. Any who, what's happening now is, it is indeed calling the AJAX function, but it doesn't display the alert, at all, so it then just moves onto the updateSpryForm function. I'm new to the Try... Catch, Throw method, so I'm sure it's something to do with that. |
I dont think this is the cause, but you changed the order of execution near the throw statemenet. Here's what I originally posted:
Code:
else if(transport.responseText == 2) {As for the current issue, im not actually sure what is causing that. The try..catch should be working fine. If you'd like to test it, try ammending the checkPass function like so: Code:
function checkPass(element) { |
Hey,
Just wanted to let you know I appreciate the help you've given me on this little thing, but it's been real stubborn and doesn't want to work, so I'm gonna leave it, I've spent way too long on it, and it's just doing my head in. I tried adding a throw where you said, and when I clicked submit, that alert appeared. I added an alert after the if(transport.responseText == 2) and when I submit, it the responseText is 2, it will show the error, but when I click that, it moves onto the next function... but that was the case before the Try... Catch method. Thanks again, but yeah... I'll forget it for now. |
| All times are GMT. The time now is 04:04 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0