+ Reply to Thread
Results 1 to 3 of 3

Thread: Lauch WHOIS.PHP in a pop-up with javascript?

  1. Join Date
    Jun 2005
    Posts
    2

    Lauch WHOIS.PHP in a pop-up with javascript?

    Hi, for my website I need to open the whois search result in a new window. I was already using a small javascript to create a pop-up the size I need, without the button and the status bar. I dont know if I can do this with something else than JavaScript...

    Here's my situation:

    The place from which the form will be filled is:

    www.mydomain.com/file.php

    the WHOIS system is in the following place:

    www.mydomain.com/whois/whois.php

    I want that, when the user click the button or the link, doesn't matter if its either one of those, it will open a pop up of 510X510, with customized window.

    I use the following JavaScript code to do a pop-up:

    Code:
    <script language="JavaScript">
    
    <!--
    function Popup(page) {
    
     myWin= open("whois/"+page, "fenetre",
    
      "width=510,height=510,status=no,toolbar=no,menubar=no,resizable=yes,scrollbars=yes");
    
    }
    // -->
     </script>
    And I use the following link to use the javascript, on a normal link:

    Code:
    javascript:Popup('whois.php')
    The JavaScript above does work perfectly, it was tested.

    I just dont know how to end up having the WHOIS result open in its own customized pop-up ? Any other way than JavaScript is welcomed too, for as long as it can open in its own pop-up, its' good.


  2. Join Date
    Jun 2005
    Posts
    2

    Lauch WHOIS.PHP in a pop-up with javascript?

    I'm sorry for answering my own topic, but I find a solution. SO if you are interested, here's how I did it:

    I did not need any code from the form page, All I had to do is add an OnLoad code in the "Default Header" of the template for the WHOIS.PHP, in the <BODY> tag, as follows:

    Code:
    <body onLoad="resizeTo(510,510)">
    This code will make the window resizes itself when it loads to the size you specify.

    Then, all that is left to do is add the target="_blank" in both links from the form. It look like this:

    Code:
    <form name='whois_search' method='POST' action='whois/whois.php' target="_blank">
    That is for the button. ANd for the "CHeck Multiple DOmain", it's as a normal link:

    Code:
    <a href="whois/whois.php?page=MultipleWhoisSearch" target="_blank">Check Multiple Domains</a>
    And tada, it open in a new page, resized.

    If you have any other solution, feel free to share them !

  3. Join Date
    Aug 2004
    Posts
    781

    Lauch WHOIS.PHP in a pop-up with javascript?

    Sorry for not replying sooner, but I was away today.

+ Reply to Thread

Posting Permissions

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