Solved

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

Posted on 1998-07-15
4
143 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
[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
  • 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

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

617 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