Solved

Check for another open browser window

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

920 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

15 Experts available now in Live!

Get 1:1 Help Now