Solved

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Do you want to insert HTML5 video into your site? This is the tutorial how to do so. What are the main advantages of HTML5 video? 1) Have good compression, good image quality, and low decode processor use. 2) It is royalty-free 3) It is easi…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

758 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

18 Experts available now in Live!

Get 1:1 Help Now