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

  • Home
  • SEARCH
  • 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 145867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:29:59+00:00 2026-05-11T08:29:59+00:00

I know JavaScript can open a link in a new window but is it

  • 0

I know JavaScript can open a link in a new window but is it possible to open a webpage without opening it in a window or displaying it to the user? What I want to do is parse that webpage for some text and use it as variables.

Is this possible without any help from server side languages? If so, please send me in a direction I can achieve this.

Thanks all

  • 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. 2026-05-11T08:30:00+00:00Added an answer on May 11, 2026 at 8:30 am

    You can use an XMLHttpRequest object to do this. Here’s a simple example

    var req = new XMLHttpRequest();   req.open('GET', 'http://www.mydomain.com/', false);    req.send(null);   if(req.status == 200)      dump(req.responseText); 

    Once loaded, you can perform your parsing/scraping by using javascript regular expressions on the req.responseText member.

    More detail…

    In practice you need to do a little more to get the XMLHttpRequest object in a cross platform manner, e.g.:

    var ua = navigator.userAgent.toLowerCase(); if (!window.ActiveXObject)   req = new XMLHttpRequest(); else if (ua.indexOf('msie 5') == -1)   req = new ActiveXObject('Msxml2.XMLHTTP'); else   req = new ActiveXObject('Microsoft.XMLHTTP'); 

    Or use a library…

    Alternatively, you can save yourself all the bother and just use a library like jQuery or Prototype to take care of this for you.

    Same-origin policy may bite you though…

    Note that due to the same-origin policy, the page you request must be from the same domain as the page making the request. If you want to request a remote page, you will have to proxy that via a server side script.

    Another possible workaround is to use Flash to make the request, which does allow cross-domain requests if the target site grants permission with a suitably configured crossdomain.xml file.

    Here’s a nice article on the subject of the same-origin policy:

    • Same-Origin Policy Part 1: Why we’re stuck with things like XSS and XSRF/CSRF
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 147k
  • Answers 147k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Yes, you have 32 characters at your disposal. SQL does… May 12, 2026 at 9:09 am
  • Editorial Team
    Editorial Team added an answer Try this: first, *rest = ex.split(/, /) Now first will… May 12, 2026 at 9:09 am
  • Editorial Team
    Editorial Team added an answer Ajax requests are asynchronous. so a new request is not… May 12, 2026 at 9:09 am

Related Questions

I know that most links should be left up to the end-user to decide
I am helping someone out with a javascript-based web app (even though I know
I have a very simple Mac Cocoa app that just has a Web View
I want to open All external link into new window/tab through php without touching

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.