PDA

Click to See Complete Forum and Search --> : New windows in browser??


wernerh
Feb 5th, 2001, 02:55 AM
How can I open a link in a new window, but a window with just the frame and not all the browser buttons and functions? I see advertisments appear in windows like this all the time but i cant find the code of how they do it!

Please Help!

Mark Sreeves
Feb 5th, 2001, 07:30 AM
you want the Javascript window.open
comamnd



<SCRIPT LANGUAGE="JavaScript"><!--
function windowOpener() {
msgWindow=window.open("","displayWindow","menubar=no,scrollbars=no,status=no,width=300,height=300")
msgWindow.document.write("<HEAD><TITLE>Message window<\/TITLE><\/HEAD>")

}
//--></SCRIPT>

wernerh
Feb 6th, 2001, 12:05 AM
Thanks alot it seems to work but how do I pass diffirent URL's, and other variables to this function??

Mark Sreeves
Feb 6th, 2001, 02:13 AM
You can specify a URL


msgWindow=window.open("HERE","displayWindow","menubar=no,scrollbars=no,status=no,width=300,height=300")

What sort of "Variables" do you want to pass to it?

wernerh
Feb 6th, 2001, 02:19 AM
If I want to use the same function for different links on the page, How can I pass the URL as variable to the function???

Mark Sreeves
Feb 6th, 2001, 02:38 AM
try this:
put your links where I've put 'about:blank'




<HTML>
<HEAD>
<script language="JavaScript">
function openWindow(url)
{
popUpWin = window.open(url,'blah','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable =0,width=200,height=300');

}
</script>


</HEAD>
<BODY>

<a href="javascript:openWindow('about:blank')">
click here</a><br>
<a href="javascript:openWindow('about:blank')">
click here</a><br>
<a href="javascript:openWindow('about:blank')">
click here</a><br>
</BODY>
</HTML>