Jump to content
Sign in to follow this  
beennn

JQuery problem

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?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...