SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member djdiablo's Avatar
    Join Date
    Jul 2004
    Location
    Cardiff
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post New window from a form

    I'm have a perl script which I want to execute, but into a new window which has the credentials I give it.

    the "target=_blank" command is not appropriate for this application as it creates a new full window. I would like a new window with no toolbars or scrollbars.

    My (somewhat modded) code:
    Code:
    <form method="POST" action="cgi-bin/myperlfile.pl">
               <select size="1" name="number">
                     <option>Send number 1</option>
                     <option selected>Send number 2</option>
               </select>
               <input type="submit" value="See the results" name="btn">
    </form>
    When creating windows from html (a href) links, I use the following code:

    Code:
    onclick="window.open(this.href,'newwindow','top=100,left=100,width=300,height=300'); return false;"
    I would like a new window to appear with the results of executing 'myperlfile.pl'

    Can anybody please help me? I've searched everywhere!
    Thanks in advance

  2. #2
    SitePoint Member mcpeekj's Avatar
    Join Date
    Feb 2004
    Location
    kansas city
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can just add the javascript inline with onsubmit:

    <form method="post" action="cgi-bin/myperlfile.pl" target="foo" onsubmit="window.open('', 'foo', 'width=450,height=300,status=yes,resizable=yes,scrollbars=yes')">

    I suppose that along those same lines, you could just call a function instead of writing all of it out inline.
    Joe McPeek - Overland Park, KS (Kansas City Metro) Web Designer
    JAM Web Creations
    Slight Detour Photography

  3. #3
    SitePoint Member djdiablo's Avatar
    Join Date
    Jul 2004
    Location
    Cardiff
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks, that worked perfectly.


Bookmarks

Posting Permissions

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