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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:45:20+00:00 2026-06-02T17:45:20+00:00

I have some icon-only action buttons on my application. The buttons are plain old

  • 0

I have some icon-only action buttons on my application. The buttons are plain old anchor tags styled using JQuery UI, for example:

<a class="move-up-button-icon-only" href="/Ctrl/Action/5/8/2">Up</a>

$('.move-up-button-icon-only').button({
  text: false,
  icons: {
    primary: "ui-icon-arrowthick-1-n"
  }
});

Icon buttons

Some of the buttons have a side-effect, so I want to POST to the href.

I know I can use a standard <input type="submit"/> button, but then I cannot use the icon-only button, as JQuery UI cannot put an icon on a normal submit button. I’d really like to keep the visual consistency with my other buttons, so is there any way to change the method of an anchor link from GET to POST?

(It is OK if this does a GET request for browsers that don’t support, say, Javascript. I will have a confirmation page in that case, and a regular form to POST.)

  • 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-02T17:45:21+00:00Added an answer on June 2, 2026 at 5:45 pm

    This seems to work, but it really feels like a dirty hack to me. Is this OK, or is there a better way?

    $('.move-up-button-icon-only').click(function () {
      if ($.browser.msie) {
        var form = document.createElement("form")
        $(form).attr('method', 'post').attr('action', $(this).attr('href'));
        document.body.appendChild(form);
        form.submit();
        document.body.removeChild(form);
      } else {
        $('<form/>').attr('method', 'post')
                    .attr('action', $(this)
                    .attr('href')).submit();
      }
    });
    

    Note that you have to add the form to the DOM in IE, other browsers just work.

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

Sidebar

Related Questions

I have seen in some browsers (Firefox for example), the RSS feed icon gets
Let's say I have a window-less application which has only an icon on the
I have a page with anchor tags that are being converted to JQuery UI
Some Windows native applications have a question mark icon on the title bar. It's
I have some files that are uuencoded, and I need to decode them, using
I have some jquery code that is doing an ajax lookup and returning comma
I have some icon resources as DrawingImage s that is made up of many
I have a Windows Forms ToolStripSplitButton which shows only an icon. I have added
In my application I am using the Action Bar with a custom SearchView in
I have a Qt application with a system tray icon and a menu that

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.