?
Solved

Check for another open browser window

Posted on 2004-08-11
5
Medium Priority
?
268 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 5

Accepted Solution

by:
LlamaJoe earned 2000 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
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…
Suggested Courses

777 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