Results 1 to 7 of 7

Thread: little question

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2002
    Location
    Toronto
    Posts
    15

    little question

    How do I make a pop-up window (using html)?


    Thanks!

  2. #2
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    You use a client side language such as javascript.

    Code:
    <script language="javascript" type="text/javascript">
    function openWin(){
    window.open('new','page.htm');
    }
    </script>
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2002
    Location
    Toronto
    Posts
    15

    thanks for your reply

    How do I do that in this kind of a tag:

    <AREA SHAPE=RECT COORDS="154,489,190,550" HREF="otherpage.html" TARGET="_blank" ALT="BRN 70" OnMouseOut="window.status=''; return true" OnMouseOver="window.status='BRN 70'; return true">

    (i.e. instead of using href)

  4. #4

    Thread Starter
    New Member
    Join Date
    Apr 2002
    Location
    Toronto
    Posts
    15
    never mind, solved that one..

    but can anyone help me with this other problem?
    how do i pass a variable from this tag (the one in my reply) to the pop-up window?


    thanks!

  5. #5
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    JavaScript passes variables the same way most modern languages do. JavaScript's syntax is based on Java, which in turn is based on C/C++, which in turn.... Perl, JScript, VB, Fortran, and a host of other languages pass variables in the same way.

    Code:
    <html>
      <head>
        <title>Test Page</title>
        <script type="text/javascript">
          function myFunction (myVar) {
            alert(myVar);
          }
        </script>
      </head>
      <body>
        <p onclick="javascript:myFunction('Foo');">Click Me!</p>
      </body>
    </html>
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  6. #6
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    You write to a document using document.write

    Code:
    <script language="javascript" type="text/javascript">
    function openWin(){
    newwin=window.open('new','page.htm');
    newwin.document.write('Something');
    }
    </script>
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

  7. #7

    Thread Starter
    New Member
    Join Date
    Apr 2002
    Location
    Toronto
    Posts
    15
    no no,.. that's not what i meant.. i know how to pass it to a function on the same page, and i don't want to write it to another page, i need to pass it to the pop-up window (which is a separate page).. how do i do that?

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