Solved

Check for another open browser window

Posted on 2004-08-11
5
264 Views
Last Modified: 2013-12-23
I have an application written in VID using mostly VB and some Java script.  I would like to be able to check to see if the user has a specific Internet web page open on their PC and then if yes, grab some hidden XML from that page.  Is this possible?  If so, how do I get started?

TIA
0
Comment
Question by:Overthere
  • 2
5 Comments
 
LVL 5

Accepted Solution

by:
LlamaJoe earned 500 total points
ID: 11807117
The only way to grab from another page is if:
a) it is on the same domain name as your page (otherwise this is a cross site scripting attack)
b) one window of internet explorer opens a new window - if someone clicks on internet explorer, this is then a new instance and you can't grab from one or the other.

in your situation, if you use window.open in script to open a new window, this new window can reference the window that launched it by referencing window.opener - then you can find any object in the document object model.

example:
parent.html
<a href=# onclick="window.open('child.html')">click me</a><br>
<input type="text" id="box" name="box" value="yo"></input>

child.html
<script>
alert(window.opener.document.getElementById('box').value);
alert(window.opener.document.URL);  //especially for you
</script>
0
 

Author Comment

by:Overthere
ID: 11809694
So if from my webpage (MYSITE.com/whatever.asp) I open another window to a different website (THEIRSITE.com/page1.htm) and send over some input data, then the user adds more data but also goes to another page on that website (THEIRSITE.com/finalpage.htm) - that's where I want to pull the XML from.  So I opened that browser window and want to pull data even though the page name is different, I can do that???  That's exactly what I would need.
0
 
LVL 5

Expert Comment

by:LlamaJoe
ID: 11817035
sorry dude, java script will not allow you to pull data from a page that exists in another domain.  
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question