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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:12:00+00:00 2026-05-26T14:12:00+00:00

In the function below, the code should take a parameter, 1) display an alert

  • 0

In the function below, the code should take a parameter,

1) display an alert with the parameter value
2) save the value to a hidden field
3) display an alert with the value read from the hidden field.

Step 1 works. I can’t confirm Step 2 is occuring and Step 3 returns ‘undefined’.

The first alert shows the correct ID – the ID passed to SaveReportId().

The second alert shows “SaveReportId() after save: undefined”

function SaveReportId(selectedReportId) {
    alert('SaveReportId() before save: ' + selectedReportId);
    $('#HiddenReportId').val(selectedReportId);
    alert('SaveReportId() after save: ' + $('#HiddenReportId').val());
}

HTML:

<div class="hiddenValues">
    <input id="HiddenReportId" type="hidden" runat="server" class="HiddenReportId" />
</div>
  • 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-26T14:12:01+00:00Added an answer on May 26, 2026 at 2:12 pm

    The hidden field had a runat=”server” attribute. I removed it and the code runs fine…

    function SaveReportId(selectedReportId) {
        alert('SaveReportId() before save: ' + selectedReportId);
        $('#HiddenReportId').val(selectedReportId);
        alert('SaveReportId() after save: ' + $('#HiddenReportId').val());
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My function below, will take the values from my custom meta fields (after a
So take a look at the below rough code: function Manager() { try {
I am using jquery datepicker, please see below code $(document).ready(function() { $(.txtDate).datepicker({ showOn: 'button',
In the code below, why does the open function work but the close function
I am using the below jquery code to call a ajax function in my
I'm writing code to do Xml serialization. With below function. public static string SerializeToXml(object
Hello friends i am running code given below which contains the setLogTimeEntery function and
Below I present you some code which has completely been butchered by me. $(.gig).hover(function()
The function below takes a python file handle, reads in packed binary data from
The code below is from SAMATE Reference Dataset . I used it to test

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.