I have a little problem here. What I am achieving is to create a model / form with jquery / ajax and there should be another AJAX call in the model (which is generated from 2 unique IDs).
Hope it makes a bit more obvious:
I have found your page and press "generate form" then jquery loads the model through AJAX & amp; Get Url: "/ Model / ID1 / ID2" (the entire form is loaded). It still works Now I want a button "post form" in this form which posts this form on the same url "/ modal / id1 / id2" and the result of the "inner" ajax call to the existing model Overrides.
I get this error:
Mail http: // localhost / modal / id1 / id2 500 (internal server error) jquery.min.js: 6 jquery. Send min.js: 6x.extend.ajax jquery.min.js: 6 (anonymous function) VM7593: 4 x.event.dispatch jquery.min.js: 5
it seems That AJAX is not working right now. Here's a bit bit code that I use: This code creates the first model I still works fine:
& lt; Script & gt; $ ('[Data-toggle =' view ']'). ('Click', function (e) {e.preventDefault (); var id1 = $ (this) .data ('id1'); var id2 = "& lt ;; php echo $ id2 ;;>; $ {(Type: "get", url: "offer /" + id 1 + "/ create /" + id2, data type: "html", success: function response) {$ ('# proposal model' ) .html (feedback); $ ('#model model'). Modal ('toggle');}})}}; & Lt; / Script & gt;
And this is the code that is returned by the AJAX request first and is shown in the model:
Hope you can (understand my problem) and help me with it.
Thank you!
Perhaps $ ('# createOffer') is not being set to click event? Perhaps it would be helpful to wrap it in the $ (document) prepared function:
$ (document) .ready (function () {$ ('# createoffender'). ('Click', function () {$ .ajax ({type: "post", url: "offer / 1 / create / 2", // url is present and data is working: {test: "test"}, success: function ( Reaction) {alert (reaction);}});});});
Comments
Post a Comment