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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:21:13+00:00 2026-05-31T20:21:13+00:00

when using an anchor and jquery to submit a form <a id=submit_registration_form href=#validate_form >Submit</a>

  • 0

when using an anchor and jquery to submit a form

<a id="submit_registration_form" href="#validate_form" >Submit</a> .... 
$('#submit_registration_form').click(function() {
    $('#registration_form').submit();
});

I can’t come back to the previous page (where the data were submit) if i use

<a href="javascript:window.history.back();">Edit form</a>

In order for the history.back() to work, form must be submitted using a submit button

<input type="submit" value="Submit" />

the probleme with input type submit button is that it is hard to style and get the same look as when using an anchor

Any help?

  • 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-05-31T20:21:14+00:00Added an answer on May 31, 2026 at 8:21 pm

    You would have to remember to return false in the handler function to stop the link getting followed after click.

    But it is much better to work on styling the submit button instead of abusing links, with the usability problems that brings. Some tips: border: none, padding: 0, background: transparent, display: inline, and for Firefox, ...::-moz-focus-inner { padding: 0; }.

    history.back() is also almost always the wrong thing (consider instead re-echoing the form contents in the new page), and javascript: URLs are to be avoided in all cases.

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

Sidebar

Related Questions

I'm trying to simulate a click on an anchor tag using jQuery. I've been
How can I retrieve the full URL to which an anchor links using jQuery
I have an anchor like <a href=/category/post/?type=234#content>link</a>. Using a jQuery is it possible to
i'm using jquery. i have a anchor list. i'm enumerate anchors, if it visited,
I am using supersized jQuery slider plugin which change one on clicking NAV anchor
I am attempting to prevent default anchor behavior in Safari using the jQuery library.
I have a MVC app and using JQuery. I have anchor that I setup
i found some code which is using anchor tags in eval eval(a='http://google.co.in'+window .location.href); The
I am using codeigniter and Jquery. I have an upload form in my view
I want to submit a form with an anchor instead of a button. Here

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.