+ Reply to Thread
Results 1 to 2 of 2

Thread: tld-dropbox multiselect

  1. Join Date
    Jun 2005
    Posts
    1

    tld-dropbox multiselect

    Hi,

    is there an easy way to use 'multiselect' for tlds when i use the Dropdownbox?
    may it is also possible to have a listfiled to check all ?

    Any help is welcome!

    Thanks for that genius Script !!

  2. Join Date
    Aug 2004
    Posts
    781

    tld-dropbox multiselect

    Not sure exactly what you want with the drop down.

    Simple enough I suppose for the check all.

    I am disappointed in myself as usually I remember to slip in the id="" attributes for all my input stuff, but I guess I overlooked that here. Other than that, you can do this with some simple javascript.

    Step one:
    Open up whois/classes/display.php in a text editor and replace the following:

    Replace:
    Code:
    $searchbar .= "<td class=\"whoisSearchTable\"><input type=\"checkbox\" name=\"ext{$i}\" value=\"{$ext}\"" .
    With:
    Code:
    $searchbar .= "<td class=\"whoisSearchTable\"><input type=\"checkbox\" name=\"ext{$i}\" id=\"ext{$i}\" value=\"{$ext}\"" .
    Step Two:
    Add this javascript between the <head> </head> tags of your site:
    Code:
    <script language="Javascript" type="text/javascript">
    function tldCheckAll()
    {
    	for(i=0, finished=false; !finished; i++)
    	{
     extBox = document.getElementById("ext" + i);
     if (extBox != null)
     	extBox.checked = true;
     else
     	finished = true;
    	}
    }
    </script>
    Step Three:
    Place a "check all" link anywhere you want via the templates page of the script:
    Code:
    <a href="javascript:tldCheckAll();">Check All</a>
    That should do it.

+ 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