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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:04:00+00:00 2026-06-12T11:04:00+00:00

I am trying to serialize some data from a form. The html: <form class=span5

  • 0

I am trying to serialize some data from a form.

The html:

<form class="span5 login navbar-form pull-right">
    <input class="span2" type="text" placeholder="E-mail" />
    <input class="last span2" type="password" placeholder="Lösenord" />
    <a class="loginbutton span1 btn btn-zen-inverse btn-mini" href="#">Logga in</a>
    <br />
    <a class="pull-right hidden" href="#">Glömt lösenord</a>
    <label class="pull-right hidden"><input type="checkbox" /> Kom ihåg mig</label>
</form>

Jquery:

$(document).ready(function() {
    $('.loginbutton').click(login);
});

function login(){
  event.preventDefault();
  var params = $('form').serialize();
  console.log(params);
}

If i put some data in the html-fields and click the “a” tag with .logintbutton on it, the console.log is just empty, I expect it to push out the data. Whit serializeArray, I get an empty array.

  • 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-12T11:04:03+00:00Added an answer on June 12, 2026 at 11:04 am

    You should provide name in input. jsfiddle

    Modified HTML:

    <form class="span5 login navbar-form pull-right">
        <input name='email' class="span2" type="text" placeholder="E-mail" />
        <input name='password' class="last span2" type="password" placeholder="Lösenord" />
        <a class="loginbutton span1 btn btn-zen-inverse btn-mini" href="#">Logga in</a>
        <br />
        <a class="pull-right hidden" href="#">Glömt lösenord</a>
        <label class="pull-right hidden"><input type="checkbox" /> Kom ihåg mig</label>
    </form>​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to serialize some objects obtained from a 3rd Party .NET Lib to
i'm trying to send some radio buttons from a form with ajax, the problem
I'm trying to serialize a class derived from List<> using DataContract. The problem is
I'm trying to serialize some data for a UDP packet stream and I'm getting
I am trying to make some data from database available using XML, I have
I am trying to post some form data to self with no success.My code
I'm trying to grab some JSON data from a web service using JSON.Net. The
I'm trying to post to the controller some data that I retrieve from the
I'm trying to figure out a way to serialize some Django model object to
I've run into some problems when trying to serialize my object to XML. The

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.