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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:51:12+00:00 2026-05-28T06:51:12+00:00

How do you use jquery (or anything else for that matter) to get the

  • 0

How do you use jquery (or anything else for that matter) to get the form values from the argument in the callback of a jquery.get() call provided it is html?

for instance, say the following call:

$.get('somePage.aspx', function (data) {  
     alert('here');
            });

called the callback function with the following html:

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title></title></head>
<body>
    <form name="form1" method="post" action="frmMontageWait.aspx?action=checkStatus&amp;guid=a224b7c3-fec8-4b55-870e-a33f15bad629" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTc5NTA2NTY5NmRkyx3R93TAvDqSvxEh6aKHeTSr0ZI=" />
</div><div> <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAwLA8/fiDgLP15SfBAKG69WwDBRTCbRBksmbw/qTkRQ4tx/K3bES" />
</div>
        <input type="hidden" name="hdnInput1" id="hdnInput1" value="100" />
        <input type="hidden" name="hdnInput2" id="hdnInput2" value="99" />
    </form>
</body>
</html>

How do you go about getting the values of hdnInput1 and hdnInput2 in the callback?

  • 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-28T06:51:12+00:00Added an answer on May 28, 2026 at 6:51 am

    The data variable in your code stores the server-response, you can parse it for the information you want. By default this server response will be in plain text, so you have to parse that string into a jQuery object which will create DOM elements out of the string:

    //DOM-ize the server-response
    data = $(data);
    
    //now we can search the server-response like it is in the DOM (but it isn't)
    var inputOne = data.find('#hdnInput1').val(),
        inputTwo = data.find('#hdnInput2').val();
    

    This code goes in your success callback for your AJAX call.

    Here is a demo: http://jsfiddle.net/PDHbV/

    I’m not 100% sure that the HTML you posted is stored in the data variable, if it isn’t then that mean the HTML is already in the DOM and you can search for it normally:

    var inputOne = $('#hdnInput1').val(),
        inputTwo = $('#hdnInput2').val();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use jQuery to get values of presaved elements from some websites, using paths
I use jQuery and AJAX to load content from links and forms into a
I use the following jQuery (1.4) code to test whether cookies are accepted: $.get(http://localhost:8080/cookietester/cookietester,
I need to use JavaScript (jQuery if applicable) to trigger my modal call if
Possible Duplicate: jQuery bind click ANYTHING but ELEMENT I have this HTML <div id=outer>
I'm trying to use jQuery and JSON with a C# Web Service that I
I see lot of example opening popup with jquery but don't see anything that
I have created a simple page that use jQuery, so include jquery.min.js. But I
I use jQuery Validation plugin to ensure what user entered positive cost_of_car in first
I use jQuery to do AJAX calls. But specialchars like ÆØÅ (danish letter) comes

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.