summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <carbon@melanarchy.org>2013-08-02 18:30:09 -0500
committerJules Laplace <carbon@melanarchy.org>2013-08-02 18:30:09 -0500
commit54e6cff6858fc214052ac2384f3b5690a89b4241 (patch)
treedf83793b0d4d74cf83d43e1d1c23743a755d6150
parente76b691e78e273226cba9284cb8cd22a423319ed (diff)
focus on search field
-rwxr-xr-xbucky2/cgi-bin/search3
-rw-r--r--lib/boxes.pm3
2 files changed, 4 insertions, 2 deletions
diff --git a/bucky2/cgi-bin/search b/bucky2/cgi-bin/search
index 15a89a6..18fb400 100755
--- a/bucky2/cgi-bin/search
+++ b/bucky2/cgi-bin/search
@@ -58,6 +58,7 @@ Pragma: no-cache
__BODY__
print <<__SEARCH_FORM__;
+<script type="text/javascript">window.onload = function(){ document.getElementById("q").focus() }</script>
<center>
<table cellspacing=0 cellpadding=0 border=0 width=900>
<tr>
@@ -66,7 +67,7 @@ print <<__SEARCH_FORM__;
<form action="/cgi-bin/bucky/2/search" method="get" enctype="multipart/form-data">
<table cellpadding=0 cellspacing=0 border=0>
<tr><td style="text-align: center; vertical-align: middle;">
-<input name="q" value="$query" maxlength=1024 style="font-size: 13px; font-family: Trebuchet MS, Helvetica, Arial, sans-serif;
+<input id="q" name="q" value="$query" maxlength=1024 style="font-size: 13px; font-family: Trebuchet MS, Helvetica, Arial, sans-serif;
color: #140A0A; border: 1px #140A0A solid; padding: 1px; margin: 0px 0px 0px 0px; width: 300px;">
</td>
<td style="text-align: center; vertical-align: middle;">
diff --git a/lib/boxes.pm b/lib/boxes.pm
index 8c29644..5f9121e 100644
--- a/lib/boxes.pm
+++ b/lib/boxes.pm
@@ -41,12 +41,13 @@ sub search_box
print <<__SEARCH__;
<div class="message">
<table width=100% border=0 cellpadding=0 cellspacing=0 style="margin: 0px;">
+<script type="text/javascript">window.onload = function(){ document.getElementById("q").focus() }</script>
<form action="$BUCKY/2/search" method="get" enctype="multipart/form-data">
$DEBUG_FORM_STRING
<tr><td height=$AVATAR_MED_WIDTH>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr><td style="text-align: center; vertical-align: middle;">
-<input name="q" value="" maxlength=1024 style="font-size: 10px; font-family: Trebuchet MS, Helvetica, Arial, sans-serif;
+<input id="q" name="q" value="" maxlength=1024 style="font-size: 10px; font-family: Trebuchet MS, Helvetica, Arial, sans-serif;
color: #140A0A; border: 1px #140A0A solid; padding: 1px; margin: 0px 0px 0px 0px; width: 100%;">
</td>
<td style="text-align: center; vertical-align: middle;">