Forum Moderators: martinibuster
<!-- SiteSearch Google -->
<form method="get" action="http://www.google.com/custom">
<table border="0" bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<a href="http://www.google.com/">
<img SRC="http://www.google.com/logos/Logo_25wht.gif"
border="0" alt="Google"></img></a>
<br/>
<input type="hidden" name="domains" value="mysite.com"></input>
<input type="text" name="q" size="31" maxlength="255" value=""></input>
</td></tr>
<tr>
<td nowrap>
<font size="-1" color="#000000">
<input type="radio" name="sitesearch" value=""></input> Web
<input type="radio" name="sitesearch" value="mysite.com" checked></input>mysite.com
</font>
<input type="submit" name="sa" value="Search"></input>
[Numerous hidden input fields]
</td></tr></table>
</form>
<!-- SiteSearch Google -->
N.B. The above isn't the correct code - it has all the hidden fields removed.
Points to discuss:
1) It doesn't need to be in a table. It's not wrong to put a form in a table and in this case it is arguably appropriate... but it's not vitally necessary.
2) Would be better if table border and background specified with style attribute.
3) Is "nowrap" standards compliant html?
4) "img SRC"? Why not "img src" - this would assist in forwards compatibility.
5) </img>? If we're using xhtml here, than this is appropriate but the font tags aren't. If we're using html 4.01 then the opposite applies.
6) The image border should be styled.
7) No label tag.
8) <font size="-1" color="#000000">? Oh please. This is very nearly the same as
<div style="font-size:10px; color:#000;"> or similar variants so why write legacy code?
9) " "? - could use styling again.
Noted improvements:
1) We can now alter the size of the input field, which is excellent news.
2) Three logos to choose from (black background, white background and gray background)... better than before but why no non-anti-aliased transparent background?
3) Vertical stacking of the elements allowed. (To a limited extent).
Look and feel issues:
1) I'd like to rename the "Search" button as a "Find" button.
2) I'd like to write a <label> tag containing the word "SiteSearch" below the Google graphic.
3) I'd like to write "Search the web" beside the radio button instead of just web.
4) I'd like to stack the radio buttons vertically rather than have them side by side.
5) I'd like the radio button for my site to come first
6) I'd like to stack the search button below the form field and above the radio buttons
7) I'd like to align the radio buttons to the left rather than the right.
[edited by: ronin at 5:33 pm (utc) on July 9, 2004]
That changes inspired me to use the search on one pf my sites, but I had to put it in the footer rather than a side bar.
Another site already had it, but I'd much prefer a bigger choice of backgrounds there.
see [globetrotters.co.uk ]
I still think they should have an "Advanced Modifications" page where they give us the form elements and certain guidelines (ie. You must include the Google logo and it must be linked) and then let us code the look and feel of the search box on our own.