html - Send some data to a url using jquery -
i having problems sending data url using jquery. idea this, in index.php page have functions allow me login, registrater, , return data json. if "tag" equal login user logs in , if it's equal sign sign in. problem i'm new @ jquery , can't see error in code won't allow register users.
<script> $(document).ready(function(){ $("#register").submit(function(){ $.post("http://localhost/aplicacion/", { tag: "register", u_name: "john", email: "john@mail.com", password: "rob" }); }); }); </script> in code sent data without regard filled in form , without part contemplate data returned in json because did little little , wanted see if worked ... doesn't.
edit: functions in index.php works (i'm developing android application in parallel , uses same system signin , logging users , works).
add return false; after $.post(...) call if don't want form proceed default submit.
Comments
Post a Comment