Solved

How do i create and access a "remote control"?

Posted on 1998-07-15
4
139 Views
Last Modified: 2010-04-09
I need to create a "remote control" browser, that I can access via ASP. For example, if I search a database, I want the result to be displayed on this "remote control" (floating over the main browser, preferably with Stay On Top feature enabled if possible), and when I click a link in the remote it should then affect something in the first (main) browser.
If there is anyone that knows how this is done, i'd be a very happy programmer :-)
0
Comment
Question by:Dempa
  • 2
  • 2
4 Comments
 

Accepted Solution

by:
santacruz earned 100 total points
ID: 1844622
Dempa

Begin by typing the following in the body tag of your main document

onLoad=makeRemote()

Next create a script like the one below

<script language="javascript">
<!--
function makeRemote(){
remote=window.open("","remotewin","alwaysRaised=yes");
remote.location.href=("URL OF THE REMOTE DOCUMENT");
if (remote.opener == null)remote.opener=window;
remote.opener.name="opener";
}
//-->
</script>

This creates the remote you are looking for, but the always on top part will only work in N4. Also be sure to make the window.open code on one uninterrupted line.

To reference the opener window type the following code inside the remote document

<script language="javascript">
<!--
function go(url){
opener.location.href=url;
}
//-->
</script>
Now whenever you create a link in the remote document use the psudeo-protocol

<A href="javascript:go('SOME URL')"> THE LINK </A>

If your using forms just create a regular form and just direct the target attribute to "opener"

good luck!
santacruz
0
 

Author Comment

by:Dempa
ID: 1844623
Great, It works...but could you please comment the code you gave so I know what each line does?
Also, how do I set the properties of the new window? I should probably mention that I have very little experience programming Javascript...
Can this be done in ASP in VBscript code instead? If so, does anyone know how?
0
 

Expert Comment

by:santacruz
ID: 1844624
Dempa

You can set the remote window properties via the function code

remote=window.open("","remotewin","alwaysRaised=yes","hieght=300","width=200","etc,etc,etc")

onLoad tells browser to launch the remote during the load process

makeRemote( ) is the function to create the new window

remote=window.open( ) is the code that gives idenity to the new window

remote.location.href( )lets the browser know where to find the new window document

if(remote.opener) statement is to name the main window opener.This is done by defult with newer browsers but this statement will handle any older browsers.

function go(url) is setup to redirect href's to the main window

santacruz
0
 

Author Comment

by:Dempa
ID: 1844625
Thanx alot!
//Dennis
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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 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

21 Experts available now in Live!

Get 1:1 Help Now