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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:21:41+00:00 2026-05-26T04:21:41+00:00

Right now, my HTML code looks like so: <div id=register> <table class=tab2> <tr> <td>Email:</td>

  • 0

Right now, my HTML code looks like so:

<div id="register">
<table class="tab2">
        <tr>
            <td>Email:</td>
            <td><input type="text" id="email" /></td>
        </tr>
        <tr>
            <td>Confirm Email:</td>
            <td><input type="text" id="confirmemail" /></td>
        </tr>
</table>
</div>

And to get the values from the inputs via jQuery, I have to do this:

$("#email").live('focusout', function() {
    email = $(this).val();
});
$("#confirmemail").live('focusout', function() {
    confirmemail = $(this).val();
});

I know there are better solutions to perform this (as my solution works, but is messy since there’s way more than two inputs), but they won’t work for me. I’d like to use something like

$("#email").val();

and just retrieve the value as it’s needed, rather than storing it to a variable. The issue is that whenever I run that code, it always returns an empty string. What would be the reason for that?

EDIT:

I forgot to mention that the values are being used after a click event is ran, like so:

$("#dialog_next").live('click', function() {

When I run the $(“#email”).val() code after that, it returns an empty string.

  • 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-26T04:21:41+00:00Added an answer on May 26, 2026 at 4:21 am

    Update: This fiddle works fine: http://jsfiddle.net/yt8pK/

    I expect this issue has something to do with when the code is actually run. Since I can’t see the problem code I can only guess. For example if you had like this:

     $(function () {
         var email = $("#email").val();
    
         function string getEmail() {
            return email;
         }
    
         ... (later you call getEmail to look at the value)
    
     });
    

    It would fail as the variable email is set before user input.

    Code like this would work:

     $(function () {
    
         function string getEmail() {
            var email = $("#email").val();
            return email;
         }
    
         ... (later you call getEmail to look at the value)
    
     });
    

    What did your code which failed look like?

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

Sidebar

Related Questions

Right now my ant task looks like. <javadoc sourcepath=${source} destdir=${doc}> <link href=http://java.sun.com/j2se/1.5.0/docs/api/ /> </javadoc>
I'm using jQuery to insert text inside a HTML tag. The HTML code looks
I have a website that right now, runs by creating static html pages from
I am working on an in-place HTML editor, concentrating on Firefox only right now.
Right now I'm doing something like this: RewriteRule ^/?logout(/)?$ logout.php RewriteRule ^/?config(/)?$ config.php I
so basically my application looks like this <!DOCTYPE html> <html> <head> ... </head> <body>
Imagine a slideshow looks similar to this: http://malsup.com/jquery/cycle/div.html except it has only two images
Okay so i'm learning html right now and soon css. In my html coding
I don't have the code available right now, but I'll describe my situation and
I have some jQuery with an Ajax call that looks like this: $.ajax({ type:

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.