Changeset 6

Show
Ignore:
Timestamp:
12/28/05 21:48:46 (3 years ago)
Author:
michiel
Message:

catch enter key cause ppl tend to use it while searching
Fixes #7

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/common/functions_blog.php

    r5 r6  
    548548                <input type="text" id="search" /> 
    549549        </form> 
     550        <script type="text/javascript" language="Javascript1.2"> 
     551                function kH(e) { 
     552                        var pK = document.all? window.event.keyCode:e.which; 
     553                        if (pK==13) { 
     554                                void(0); 
     555                        } 
     556                        return pK != 13; 
     557                } 
     558                document.onkeypress = kH; 
     559                if (document.layers) document.captureEvents(Event.KEYPRESS); 
     560        </script> 
     561 
     562 
     563 
     564 
     565 
    550566        <div id="searchresults"></div> 
    551567        <script src="common/js/liveRequest.js" type="text/javascript" language="javascript1.2"></script>