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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:10:54+00:00 2026-05-27T02:10:54+00:00

I am new to JavaScript and Ajax. I have a form which posts to

  • 0

I am new to JavaScript and Ajax.

I have a form which posts to remote url and returns a XML response containing some data and a URL. I need to extract the url and redirect to the URL in the XML response.

Here is my form

<form target="_blank" action='https://requesturl.co.uk/requestservice.asmx/Request_v4' method="POST"  >
<input type='hidden' value='' name='AffiliateID' /><input type='hidden' value='' name='AffiliatePW' /><input type='hidden' value='' name='ReqMode' /><input type='hidden' value='' name='ReqTotalTimeout' /><input type='hidden' value='' name='ReqLenderTimeout' /><input type='hidden' value='' name='ReqLoanAmount' /><input type='hidden' value='' name='AppTitle' /><input type='hidden' value='' name='AppFirstName' /><input type='hidden' value='' name='AppLastName' /><input type='hidden' value='' name='AppEmail' /><input type='hidden' value='' name='AppDOBDay' /><input type='hidden' value='' name='AppDOBMonth' /><input type='hidden' value='' name='AppDOBYear' /><input type='hidden' value='' name='AppHomePhone' /><input type='hidden' value='' name='AppWorkPhone' /><input type='hidden' value='' name='AppMobilePhone' /><input type='hidden' value='' name='AppPostCode' /><input type='hidden' value='' name='AppHouseNumber' /><input type='hidden' value='' name='AppStreet' /><input type='hidden' value='' name='AppTown' /><input type='hidden' value='' name='AppCounty' /><input type='hidden' value='' name='EmpIncomeType' /><input type='hidden' value='' name='EmpEmployerName' /><input type='hidden' value='' name='EmpTimeAtEmployer' /><input type='hidden' value='' name='EmpNetMonthlyPay' /><input type='hidden' value='' name='EmpPayFrequency' /><input type='hidden' value='' name='EmpDirectPayment' /><input type='hidden' value='' name='EmpNextPayDay' /><input type='hidden' value='' name='EmpNextPayMonth' /><input type='hidden' value='' name='EmpNextPayYear' /><input type='hidden' value='' name='EmpFollowingPayDay' /><input type='hidden' value='' name='EmpFollowingPayMonth' /><input type='hidden' value='' name='EmpFollowingPayYear' /><input type='hidden' value='' name='EmpNINumber' /><input type='hidden' value='' name='BankAccount' /><input type='hidden' value='' name='BankSortcode' /><input type='hidden' value='' name='BankDebitCard' /><input type='hidden' value='' name='AppAddressYears' /><input type='hidden' value='' name='AppAddressMonths' /><input type='hidden' value='' name='AppHomeStatus' /><input type='hidden' value='' name='ReqConsent' /><input type='hidden' value='' name='ReqIPAddress' /><input type='hidden' value='' name='ReqAgent' /><input type='hidden' value='' name='ReqMarketingOptIn' /><input type='hidden' value='' name='ReqDomain' />
<input type="submit" value="Invoke" class="button">

The XML response is

<RequestResult><Result>Accepted</Result><FailureReasons/><AcceptedLender>LendingStream</AcceptedLender><RedirectURL>http://redirecttothisURL.com/testing.htm</RedirectURL><PPDReference>6524845</PPDReference></RequestResult>

after some research it looks like Jquery would be best to do this but I’m getting confused if the fact its posting to remote URL will create problems due to browsers not allowing it.

Any help or ideas would be greatly appreciated.

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-27T02:10:55+00:00Added an answer on May 27, 2026 at 2:10 am

    Yes, due to the same origin policy restriction you cannot use javascript to perform this request. You could write a server side script that will perform the request to fetch the remote resource and then use an AJAX request to this server side script on your domain that will bring the XML and allow you to parse it.

    Obviously depending on the server side language you are using there might be different ways to implement this.

    But if you want to use jQuery it is pretty easy once you have setup this server side script on your domain. You simply use the $.ajax() method:

    $.ajax({
        url: '/url_to_your_server_side_script_that_serves_as_a_bridge',
        success: function(xml) {
            alert($('Result', xml).text());
        }
    });
    

    And here’s a live demo.

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

Sidebar

Related Questions

In javascript I have the following: $.ajax({ url: /ajax/test, type: POST, dataType: html, data:
I have to form a JSON string in which a value is having new
I have a javascript function that posts data to a validation script and grabs
I'm completely new to the javascript and ajax world but trying to learn. Right
Hey there, new to AJAX, JS.. Im trying to add to a Javascript/Ajax search
Yo. I'm really quite new to this whole JavaScript business, not to mention AJAX,
I am unable to determine which form submit button is clicked during an Ajax
I'm sending AJAX form from page in http scheme to https url (the domain,
Hi guys I am rather new at AJAX programming but I have managed to
I have a form which collects a persons address. When they click submit I

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.