javascript - On click submit a form the redirect to a URL is not working -
I have a list of items, for each item I have a button, clicking the button, I submit the form I am here. >
So in this way I have one more I am facing this problem when I do not submit the function, after that I can not debug a script when it is not known on the function, this means its code is executed to What's the problem?
ten items with different values & amp; ID . Form_id = $ (this) .next ('# enrollment' + id); live ('click', function) (var id = $ (this) .attr ('data-$' id '); above hrefTo = $ (This) .attr ('data-content'); $ (form_id) .submit (function () {wall (), 'email': $ ('input [name = email]'). Val () (' ('Input [name = user_id]'). Val (), 'username': $ ('input [name = user name]'). Val (), input '[name = email],' user_id ' 'UserImage': $ ('input [name = userImage]'). Val (), 'course_id': $ ('input [name = course_id]') Val ()} $ .ajax ({type: 'Post ', // define HTTP type action we (posted for our form) Want to use RL: '[url]? $ Vars echo php & lt'? & Gt; learn / amfphp / services / data / rest / enrollCourseOnLoad '', data: formData, success: function (data) {if (data } {Window.location.href = hrefTo;}}});});});
$ (form_id)
$ ('div.enroll_onload').
Comments
Post a Comment