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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:18:30+00:00 2026-05-26T21:18:30+00:00

All, I have a Jquery ajax request calling out a URL. The ajax response

  • 0

All,

I have a Jquery ajax request calling out a URL. The ajax response I receive is an HTML form with one hidden variable in it. As soon as my ajax request is successful, I would like to retrieve the value of the hidden variabl. How do I do that?

Example:

html_response for the AJAX call is : 
<html><head></head><body><form name="frmValues"><input type="hidden" 
name="priceValue" value="100"></form></body></html>


$.ajax({
        type: 'GET',
        url: "/abc/xyz/getName?id="+101,
        cache: false,
        dataType: "html",
        success: function(html_response)
        {
            //Extract form variable "priceValue" from html_response
            //Alert the variable data.                                 
        }
        });

Thanks

  • 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-26T21:18:31+00:00Added an answer on May 26, 2026 at 9:18 pm

    The html_response you get will be a string. As such, if you happen to know exactly what the page will look like, you can just search the text using indexOf.

    …But that solution is messy and error prone. Alternatively, you could create a new HTML element (like a div), put your response html in there, and then obtain the hidden variable as you would access any normal html element.

    For example:

    var tempDiv = $("<div/>");
    tempDiv.append(html_response);
    var myValue = tempDiv.find("input[name='priceValue']").val();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strange error where my jquery ajax request doesn't submit all the
I have jQuery.ajax() creating a request to a url (cms2/docman/dir/%id) (%id is a numeric
Is it possible to have one jQuery ready block executed after all others have
I have a jQuery .ajax call: $j.ajax({ type: POST, url: /Services/Cart.asmx/UpdateQuantity, data: data, contentType:
In my Ajax request (using jQuery ) I am returning a JSON response. So
I have a jQuery ajax script to process a form on submit. However, I
I use the ajax-request queue as posted here: Wait until all jQuery Ajax requests
I have jQuery Ajax request that sends data to a PHP page that then
I have the following jQuery AJAX request: function sendUpdate(urlToSend) { var code = AccessCode;
I have enabled SSL and I am doing a jQuery AJAX post request and

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.