I want to add the product, the form through jquery no refresh (get) submitted, there is also a batch image upload is made by To upload pictures, when I click the Add button, the entire form has been prompted to be submitted ...., I suspect that the image upload form and submit form conflict, do not upload the picture can otherwise not be able to interact with the background, do not know what method? Who's the great God to help?
Reply to discussion (solution)
You'd better send the code structure of your big form and small form.
According to you, when you click the Add button, the commit action is triggered? This must be a problem, just click the Add button, how can it?
Code has been posted up, trouble to help you look at it, I really have no good way, technology not home can only ask you
Get upload picture var imagesall = new Array (); $ ("img"). each (function () { if ($ (). attr ("class") = = "Preview") { Imagesall.push ($ (this). attr ("value")); } }); var imagesall = Imagesall.join (', ');//Get the database to read the picture var imagesall2 = new Array (); $ ("img"). each (function () { if ($ (). attr ("class") = = "Goods_img") { Imagesall2.push ($ (this). attr ("src" )); } }); var imagesall2 = Imagesall2.join (', ');
Follow the changes.
Thank you, I tried, it worked.