Jump to content

JQuery problem


beennn

Recommended Posts

I'm trying to pass some variables from javascript to php but i'm having some trouble. I've tried replicating: http://stackoverflow.com/questions/5227132/executing-a-php-script-in-javascript Here's how mine looks (pretty much copied exactly since it wasn't working):

function validateEdit() {var canGo = true;var dob = document.getElementById('dobtext').value;if (canGo  == true){  $.post('php/edit_profile.php', {dob : dob}, function(){       }).error(function(){    alert('error... ohh no!');   return false;   });} }

Which leads to "error... ohh no!". Any ideas what it is I'm doing wrong?

Link to comment
Share on other sites

have you looked in the error console for any HTTP related errors? (404, 500, etc) also, if you use a browsers developer tools like in Chrome, the network tab will show you all HTTP requests made by the browser, and their responses. I would check there and see what kind of messaging you can gleam from it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...