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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:52:13+00:00 2026-05-18T00:52:13+00:00

We are creating a script. Essentially user enters into a formfield :3358928 OnSubmit ajax,

  • 0

We are creating a script.

Essentially user enters into a formfield :3358928
OnSubmit ajax, visits the page below appending the numeric string the user entered into the url.

http://www.fairtrading.qld.gov.au/ftlr/Default.aspx?ResultType=LNum&LNum=3358928&LType=REAL%20ESTATE&Page=1

On that url, is a first name and a surname.
How would we scrape the first name and surname, and echo it back to our form.

Essentially the issue arises, from scraping the page.

Any help appreciated.

  • 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-18T00:52:13+00:00Added an answer on May 18, 2026 at 12:52 am

    First, your web server must be set up to proxy all of the client’s requests. Otherwise, the third-party server would have to send an Access-Control-Allow-Origin header and the visitor’s browser would have to support cross-domain XMLHttpRequest. (Flash/Silverlight similarly requires a crossdomain.xml file.)

    This is exactly the way http://ajax-cross-domain.com/ works. (That particular proxy script just happens to JavaScript-encode the third-party server’s response.)

    I noticed that the particular page includes an XHTML doctype, which seemed to indicate you could use the responseXML property of native XMLHttpRequest or jQuery (as opposed to AJAX Cross Domain) to take advantage of the browser’s XML parser. Unfortunately, this is just another web site that outputs invalid XML — it does not encode ampersands correctly as &.

    Thus you will most likely resort to regular expressions, which is not ideal. Most probably, the simplest approach is to find the text of the td elements (relying on the fact that the exact same tag is not nested):

    // Creating the regexp object    
    var regex = /<td class="BodyFont">(.*?)<\/td>/g;
    
    // Execute this line of code as many times as needed.
    contentsOfNextTd = regex.exec(textOfThePage)[1];
    

    Sort of ugly, considering that it would be much simpler if only we had valid XML to work with. And if you have the option, I would recommend scraping the page on your own server and returning a nicely-formatted JSON or XML response — you need a server-side proxy anyways and it will keep the client-side code simpler.

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

Sidebar

Related Questions

Call me a 'n00b', but I am new to creating Script Controls. I want
I am creating a script on the fly to ftp some files from a
Say a client is happy with the work you've done creating a script to
I'm creating an installation script for an application that I'm developing and need to
I am creating an ASP script that uses the application object to store the
I have got a python script which is creating an ODBC connection. The ODBC
I wrote a short bash script to complete a task that involves creating a
I am creating some build scripts that interact with Perforce and I would like
I'm creating a gem which has several scripts in the bin directory the utility
We currently deploy web applications by creating a database and running SQL scripts through

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.