Forum Moderators: mack

Message Too Old, No Replies

Very Basic form question

Google search my site

         

kittimakai

6:18 pm on Feb 21, 2004 (gmt 0)

10+ Year Member



Hello Everyone

I have this form:

<form method="GET" action="http://www.google.com/search">
<input type="hidden" name="domains" value="widgets.com">
<input TYPE="text" name="q" size="25" maxlength="200" value>
<input type=image alt=search src="submit.gif">
</form>

I need it to search widgets.com using google. But the search is searching *all* of google not just widgets.com. I do not want anymore buttons other than the submit one to keep it as simple as possible.

I know I am missing really easy but I cannot see it. Could someone tell me how to arrange the form so that I can submit the search query.

Also a good forms tutorial would be really helpful as I am attempting a form based contact page as well.

Kitti

Shannon Moore

3:23 am on Feb 22, 2004 (gmt 0)

10+ Year Member



You have it almost right. You need to add the following line:

<input type="hidden" name="sitesearch" value="widgets.com">

No tutorial, but you can view source on Google's http://www.google.com/help/features.html [google.com] page to see their site search code. That's where most of us got it (or here on WebmasterWorld! :) )

kittimakai

1:52 pm on Feb 22, 2004 (gmt 0)

10+ Year Member



Shannnon

Thank you! It worked a treat.

I have a problem positioing the form within a table cell now. There appears to be a soft return under the search box - like I have <p> or <br> tags. The table/table cells does not contain any height formatting.

How do I remove this so the table displays the form as it would any other non formatted data? CSS?

Kitti

kittimakai

11:38 am on Feb 25, 2004 (gmt 0)

10+ Year Member



I have hacked this one!

I used a DW Layer set with a width of 100% but I am nervous about this - can <div>s be given percentage values? Display OK in Opera 7, IE 6, Mozilla and NN7 - should I be worried?

I know I should use CSC to position the form but I am unsure how.

Kitti.