Solved

Check for another open browser window

Posted on 2004-08-11
5
251 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now