Solved

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

Posted on 1998-07-15
4
141 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jQuery Dialog Autoresize Bug 2 31
Button function on table is in trouble 3 32
Ouput in html in powershell 2 32
Change static entered data to dynamic with counter 5 32
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
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…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

685 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