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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:48:32+00:00 2026-05-28T17:48:32+00:00

I have a hidden input field defined in the html. I’m accessing the value

  • 0

I have a hidden input field defined in the html. I’m accessing the value of the input field but getting undefined.

HTML

<html>
   <head>
      <script src="js/jquery-1.6.4.js" type="text/javascript"></script>
      <script src="js/myjquery.js" type="text/javascript"></script>
</head>
<body>
   <form>
      <input type="hidden" name="hidden1" value="test" id="hidden1">
   </form>
</body>
</html>

UPDATED HTML

<html>
   <head>
      <script src="js/jquery-1.6.4.js" type="text/javascript"></script>         
</head>
<body>
   <form>
       <script src="js/myjquery.js" type="text/javascript"></script>
      <input type="hidden" name="hidden1" value="test" id="hidden1">
   </form>
</body>
</html>

UPDATED 2 HTML

<html>
   <head>
      <script src="js/jquery-1.6.4.js" type="text/javascript"></script>         
</head>
<body>
   <form>
       <script src="js/myjquery.js" type="text/javascript"></script>
      <input type="hidden" name="sk.hidden1" value="test" id="sk.hidden1">
   </form>
</body>
</html>

JQuery

$(document).ready(function () { 
   var inputParam = $("input#sk.hidden1").val();
   alert(inputParam);
});
  • 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-28T17:48:33+00:00Added an answer on May 28, 2026 at 5:48 pm

    Wild guessing here but seams that you are probably not including jQuery correctly.

    Try to include jQuery in the following fashion:

    <html>
       <head>
          <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>         
    </head>
    

    Edit:

    Even though your ID is valid it is frowned uppon because jQuery will treat that as id.class.

    Meaning it is looking for a field that has ID = sk class = hidden1.

    If you must work it that way you should have your selector with an escape:

    $('#sk\\.hidden1');
    

    But I would sugest you rename your ID to someting else and discard the usage of dots in ID’s or classes. Use the - or _ as both are supported.

    The rules to name an ID are pretty simple:

    • Must begin with a letter A-Z or a-z
    • Can be followed by: letters (A-Za-z), digits (0-9), hyphens (“-“), and underscores (“_”)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an hidden input field with a value, <form> <input type=hidden value=product/> <select
I have this <%=Model.StartDate%> <%=Html.Hidden(StartDate, Model.StartDate)%> it outputs: 2010-05-11 11:00:00 +01:00 <input type=hidden value=2010-03-17
I have a hidden input field that will take the value of another on
I have a hidden input variable called str. I am assigning abc value to
I have been trying to set the value of a hidden input by using
I have a Javascript function which should update a hidden input field in my
With jquery autocomplete I have a hidden input field to store ID because the
Simple question. I have the following hidden input field on my ASP.NET page: <form
I have a third party control that utilizes a single hidden input field to
I have some hidden inputs like this <input name=exam.normals[1].blahblah ..../> I would like somehow

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.