Jquery batch upload is Post submission, so the entire form cannot be submitted to the background?

Source: Internet
Author: User
Jquery batch upload is Post submission, so the entire form cannot be submitted to the background? I want to add a product, and the form is submitted through jquery brushless newest (get). There is also a batch image upload in it to use To upload the image. when I click the Add button, the whole form always prompts that the image is being submitted ...., I suspect that the form for uploading images conflicts with the form for submitting images. if you do not upload images, you will not be able to interact with the background. Is there any way? Which of the following experts can help you?


Reply to discussion (solution)

You 'd better publish the code structure of your large form and small form.
According to what you said, when you click the Add button, the submitted action is triggered? This is definitely a problem. it's just a matter of clicking the Add button. how can this happen?

The code has already been posted. please take a look at it. I have no good solutions. I can only ask for help if I have no technical skills.

// Obtain the uploaded image var imagesall = new Array (); $ ("img "). each (function () {if ($ (this ). attr ("class") = "preview") {imagesall. push ($ (this ). attr ("value") ;}}); var imagesall = imagesall. join (','); // Obtain the image read from the database var imagesall2 = new Array (); $ ("img "). each (function () {if ($ (this ). attr ("class") = "goods_img") {imagesall2.push ($ (this ). attr ("src") ;}}); var imagesall2 = imagesall2.join (',');

Change according

Thank you. I tried it. it succeeded.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.