Results 1 to 6 of 6

Thread: New windows in browser??

  1. #1

    Thread Starter
    Addicted Member wernerh's Avatar
    Join Date
    Sep 2000
    Posts
    170

    Question

    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!

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    you want the Javascript window.open
    comamnd


    Code:
    <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>
    Mark
    -------------------

  3. #3

    Thread Starter
    Addicted Member wernerh's Avatar
    Join Date
    Sep 2000
    Posts
    170

    Talking Thanks, but how do I pass value

    Thanks alot it seems to work but how do I pass diffirent URL's, and other variables to this function??

  4. #4
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    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?
    Mark
    -------------------

  5. #5

    Thread Starter
    Addicted Member wernerh's Avatar
    Join Date
    Sep 2000
    Posts
    170
    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???

  6. #6
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    try this:
    put your links where I've put 'about:blank'


    Code:
    <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>
    Mark
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width