Kieran-R Posted April 11, 2011 Share Posted April 11, 2011 Hi, I was having problems loading a form via jQuery. Basicaly, when you look at the source when you load it via jQuery, it goes like this: <form></form> <input type=..... So the form doesnt work properly. Does anyone have a solution for this problem? PS: Im loading it 'data'.... Quote Link to comment Share on other sites More sharing options...
Djkanna Posted April 11, 2011 Share Posted April 11, 2011 var form = '<form>...</form>'; $(form).appendTo('body'); Done. Quote Link to comment Share on other sites More sharing options...
Kieran-R Posted April 11, 2011 Author Share Posted April 11, 2011 But im actually loading the form from an external php file, and some of the values within the form different. Is there another way this can be done? Quote Link to comment Share on other sites More sharing options...
Dave Posted April 11, 2011 Share Posted April 11, 2011 Surely you could just update the input values? Quote Link to comment Share on other sites More sharing options...
Djkanna Posted April 11, 2011 Share Posted April 11, 2011 But im actually loading the form from an external php file, and some of the values within the form different. Is there another way this can be done? Ajax $.ajax({ url: 'path', dataType: 'html', success: function (data) { $(data).appendTo('body'); } }); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.