Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8320355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:37:39+00:00 2026-06-08T22:37:39+00:00

I am sorry for posting a question which is similar to almost 100 questions

  • 0

I am sorry for posting a question which is similar to almost 100 questions on SO. I read a lot of them, tried a couple of solutions but was not able to either fix my problem or completely relate the answers to my issue.

  1. I have a form with an action, type post.
  2. I have a <input type="submit"> in that form.
  3. I need to submit this form by triggering a ‘click‘ on this input. Which I do by $('#imageUploadSubmit').click();

I am not supposed to bypass ‘clicking’ this submit button because there are other events associated with this, which are essential and come from Struts jQuery. Hence I cannot submit the form directly.

Problem : my form action (uploadImage) is being called twice. And I am unable to prevent it.

Relevant piece of JSP:

<s:form id="image-upload-form" action="uploadImage" method="post" enctype="multipart/form-data">
    <s:file name="userImage" label="User Image" id="userImageFile" />
    <input type="hidden" id="idForUpload" name="idForUpload" value="<s:property value="imageUploadReqAttrib.imageName" />" />
    <sj:submit id="imageUploadSubmit" value="Select Image" targets="previewImageDiv" 
        indicator="indicator" onBeforeTopics="before" onCompleteTopics="complete" style="display:none;"/>
</s:form>

and the generated Html (with relevant elements)

<form id="image-upload-form" name="image-upload-form" action="/foo/uploadImage.action" method="post" enctype="multipart/form-data">
      <input type="file" name="userImage" value="" id="userImageFile"></td>
      <input type="hidden" id="idForUpload" name="idForUpload" value="1371711900.jpg">
      <input type="submit" id="imageUploadSubmit" value="Select Image" style="display:none;">
</form>

Is there a way by which I could find out all the events that are being triggered on and after that click? In Chrome Inspector? Fiddler?

I would appreciate any pointers. Thank You.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T22:37:41+00:00Added an answer on June 8, 2026 at 10:37 pm

    After googling more, this is what seems to be the problem : All versions > 2.1.0 of struts2-jquery-plugin have this issue. Now, I’m not sure if the problem is the way which I am using the plugin or if it is actually a bug. An open bug in the community makes me feel that this is a bug.

    So, I moved from struts2-jquery-3.3 to struts2-jquery-2.1.0 😐

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry to be posting this question. :( But I have spent almost the entire
Sorry if this question seems stupid, but it's stumped me for a couple days,
Sorry for posting such a lowly beginner's question, but I just still don't know
EDIT: I solved it seconds after posting the question (sorry!) but can't accept an
I'm sorry for posting a semi-duplicate, but I've stopped getting answers in another question
Sorry, for double posting, already posted this question once, but I realized I weren't
First up, sorry for the mega-posting of code but... I have the following DB
Sorry for question but I can't find answer anywhere on internet. I couldn't find
Sorry for this simple question, but I can't solve it... There is an example:
Sorry, I know this question is easy, but I don't know how to get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.