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 8294903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:23:41+00:00 2026-06-08T14:23:41+00:00

So I have the submit button that looks like this: <a href=# id=submitbutton onClick=document.getElementById(‘UploaderSWF’).submit();>

  • 0

So I have the submit button that looks like this:

<a href="#" id="submitbutton" 
onClick="document.getElementById('UploaderSWF').submit();">
<img src="../images/user/create-product.png" border="0" /></a>

When I double click it double submits obviously, and the problem is that
I’m saving the information in the database so I’ll have dublicate information there,
and I dont want that. This uploader uses flash and javscript and here is a little piece
of code that is relevant to the submit thing (if it helps)

$.fn.agileUploaderSubmit = function() {
    if($.browser.msie && $.browser.version == '6.0') {
        window.document.agileUploaderSWF.submit();
    } else {
        document.getElementById('agileUploaderSWF').submit();
        return false;
    }
}

Thank you guys.
I appreciate your help. This is really something I was unable to do myself
because I have such a little experience with js and I dont really know how
to do stuff.
THANKS.

  • 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-08T14:23:42+00:00Added an answer on June 8, 2026 at 2:23 pm

    Try this snipped:

    $('#your_submit_id').click(function(){
        $(this).attr('disabled');
    });
    

    edit 1

    Oh, in your case it is a link and no submit button …

    var submitted = false;
    
    $.fn.agileUploaderSubmit = function() {
        if ( false == submitted )
        {
            submitted = true;
    
            if($.browser.msie && $.browser.version == '6.0') {
                window.document.agileUploaderSWF.submit();
            } else {
                document.getElementById('agileUploaderSWF').submit();
            }
        }
    
        return false;
    }
    

    edit 2

    To simplify this, try this:

    <!doctype html>
    
    <html dir="ltr" lang="en">
    
    <head>
    
    <meta charset="utf-8" />
    
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    
    <script type="text/javascript">
    <!--//--><![CDATA[//><!--
        $(document).ready(function()
        {
            $('#yourSubmitId').click(function()
            {
                $(this).attr('disabled',true);
    
                /* your submit stuff here */
    
                return false;
            });
        });
    //--><!]]>
    </script>
    
    </head>
    <body>
    
    <form id="yourFormId" name="yourFormId" method="post" action="#">
        <input type="image" id="yourSubmitId" name="yourSubmitId" src="yourImage.png" alt="Submit" />
    </form>​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​
    
    </body>
    </html>
    

    Use form elements, like <input type="image" />, to submit a form not a normal link.

    This works fine!

    Take a look at jQuery.post() to submit your form.

    Good luck.

    edit 3

    This works well for me too:

    <!doctype html>
    
    <html dir="ltr" lang="en">
    
    <head>
    
    <meta charset="utf-8" />
    
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    
    <script type="text/javascript">
    <!--//--><![CDATA[//><!--
        $(document).ready(function()
        {
            var agileUploaderSWFsubmitted = false;
    
            $('#submitbutton').click(function()
            {
                if ( false == agileUploaderSWFsubmitted )
                {
                    agileUploaderSWFsubmitted = true;
    
                    //console.log( 'click event triggered' );
    
                    if ( $.browser.msie && $.browser.version == '6.0' )
                    {
                        window.document.agileUploaderSWF.submit();
                    }
                    else
                    {
                        document.getElementById( 'agileUploaderSWF' ).submit();
                    }
                }
    
                return false;
            });
        });
    //--><!]]>
    </script>
    
    </head>
    <body>
    
    <form id="agileUploaderSWF" name="agileUploaderSWF" method="post" action="http://your.action/script.php">
        <input type="text" id="agileUploaderSWF_text" name="agileUploaderSWF_text" />
    </form>​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​
    
    <a href="#" id="submitbutton"><img src="../images/user/create-product.png" border="0" /></a>​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​
    
    </body>
    </html>
    

    Hopefully this helps.

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

Sidebar

Related Questions

I have a simple form that looks like this: <form action=# name=submit method=post> <input
I have this HTML which looks like this: <input type=submit name=savebutton class=first button />
I have got some markup that looks like this: <div class=button> <span class=image></span> <input
I have an HTML form that needs multiple submit buttons, like this: <input type=submit
I have one image submit button like this <input id=enter name=enter type=image value=Login src=images/btn_login.jpg/>
I would like to have a submit button that contains text and an image.
I have a form that looks like this <form action=/receiver.pl method=post> </form> Clicking on
I have a nested model structure that looks like this: resources :users, :path =>
I have a form that looks like this : [ enterdata: [______] ; more
I have a servlet that calls MySQL database. The deletePage method looks like this:

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.