home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Would this be possible?

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2604
Discussions: 201,004, Posts: 2,380,069, Members: 246,371
Old January 8th, 2003, 03:08 PM   Digg it!   #1 (permalink)
Member
 
Join Date: Jan 2003
Location: England
Posts: 165
Would this be possible?

Hi guys/gals... i got inspired by this thread, to do with adding a search box on your own site. Well im much more an arty type than a html type, so i know how i want it to look/fit on my page, i just dont know how to do it, or if its possible.

Did that make sense? O_o!

Hopefully the attached image will make it clearer, the red box is where i would like a text box for people to type in stuff, the yellow box would be the "Go!" button.

If this is too hard just tell me to go away, please bear in mind my html and javascript skills are *cough* limited *cough*... i know OnMouseOver, thats about it

Any help is appreciated.
Attached Thumbnails
Would this be possible?-search.gif  
__________________
~Fade2Grey
Fade2Grey is offline   Reply With Quote
Old January 9th, 2003, 07:01 AM     #2 (permalink)
Member
 
Join Date: Jan 2003
Location: England
Posts: 165
Not easy enough to expliain in a quick answer huh?

np.
Fade2Grey is offline   Reply With Quote
Old January 9th, 2003, 09:16 AM     #3 (permalink)
ph34r t3h g04t
 
Whir's Avatar
 
Join Date: Oct 2001
Location: Kingsford, MI
Posts: 19,594
Blog Entries: 7
Well, you need to use a form to get the text from the user.

Second, you need to parse apart the text from the user when he hits the go button.

Next you need to learn the search string criteria for a search site (I recommend google).

Now you have you little javascript create a URL based on the input of the user and the search engine criteria.

I would bet that if you google for 'add search field to website' you will find some code to do exactly what you're looking for.
Whir is online now   Reply With Quote
Old January 9th, 2003, 09:54 AM     #4 (permalink)
Member
 
Join Date: Jan 2003
Location: England
Posts: 165
argh... so i found the code i needed from google, and tried to put it into a table and stuff. There is one table cell with 3 things in a line from left to right -- a picture, then the text box, then the button.

but it wont align them up

i want the text box and button to be pretty much touching the top of the table cell.

this is the background of the table cell:



this is the picture on the far left (that aligns itself well):



the reason i added the picture instead of having the text in the background image is because i didnt know how to move the boxes over so i though by using a pic i could "push" them over to the right... it worked... kinda...

this is my code...

Code:
<HTML>

<HEAD>
<TITLE>Google Search Box</TITLE>
</HEAD>

<BODY TOPMARGIN=0 BOTTOMMARGIN=0 LEFTMARGIN=0 RIGHTMARGIN=0 BGCOLOR=RED>

<br><br><br><br><br><br><br>

<!-- End Search Google -->
<FORM METHOD=GET ACTION="http://www.google.com/search">
 <TABLE CELLSPACING=0 CELLPADDING=0 BGCOLOR="#000000">
  <TR>
   <TD BACKGROUND="Image1.jpg" WIDTH="301" HEIGHT="30">
    <IMG SRC="Image2.jpg" WIDTH="109" HEIGHT="30" BORDER="0">
    <INPUT TYPE=text NAME=q SIZE=16 MAXLENGTH=255 VALUE="">
    <INPUT TYPE=submit NAME=btnG VALUE="Go!">
   </TD>
  </TR>
 </TABLE>
 </FORM>
<!-- End Search Google -->

</BODY>

</HTML>
anyone see what the prob is?

EDIT: Here is what it does =/

Last edited by Fade2Grey : January 9th, 2003 at 09:56 AM.
Fade2Grey is offline   Reply With Quote
Old January 9th, 2003, 07:28 PM     #5 (permalink)
Senior Member
 
Join Date: Oct 2001
Location: Alberta, Canada
Posts: 563
add align=left to the img tag

ex:
Code:
<!-- End Search Google -->
<FORM METHOD=GET ACTION="http://www.google.com/search">
 <TABLE CELLSPACING=0 CELLPADDING=0 BGCOLOR="#000000">
  <TR>
   <TD BACKGROUND="Image1.jpg" WIDTH="301" HEIGHT="30">
    <IMG SRC="Image2.jpg" WIDTH="109" HEIGHT="30" BORDER="0" align=left>
    <INPUT TYPE=text NAME=q SIZE=16 MAXLENGTH=255 VALUE="">
    <INPUT TYPE=submit NAME=btnG VALUE="Go!">
   </TD>
  </TR>
 </TABLE>
 </FORM>
<!-- End Search Google -->
worked in my tests(ie5.5/ns4.78/opera6.03)

cheers!
^hyd^ is offline   Reply With Quote
Old January 9th, 2003, 07:46 PM     #6 (permalink)
Member
 
Join Date: Jan 2003
Location: England
Posts: 165
I love you.
Fade2Grey is offline   Reply With Quote
Old January 13th, 2003, 03:17 AM     #7 (permalink)
Ultimate Member
 
PyroSama's Avatar
 
Join Date: Nov 2002
Location: Boise, Idaho
Posts: 2,782
Send a message via ICQ to PyroSama Send a message via MSN to PyroSama
Have a link to the finished product?
__________________
JOIN [FaD] | TEAM NUMBER 2037 | http://www.techimo.com/forum/t121132.html
PyroSama is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3132)
‘Rogue’ or ‘Rouge’? (10)
Foxconn Blackops x48 MoBo (5)
Nvidia GTX 260 problem (14)
Delete an OS (18)
Laptop with wireless problem. (14)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
Regular Build (11)
Point and Shoot Camera Suggestions. (9)
windows vista security holes (19)
[F@H SPAM 11/16/09] ! 1/2 months to.. (42)
windows 7 problem (7)
Internet Lost (5)
Recent Discussions
cant access the internet (0)
Charge4All Black Friday Special - Twi.. (0)
Browsers wont load websites (4)
Unallocated Space (3)
Size after cutting 700Mb file is 2.5 .. (1)
Blackberry Bold 9000 (0)
Can't open Word (13)
Rar volume (number 7) (1)
System restore :) (1)
Laptop with wireless problem. (14)
Looking for new motherboard (2)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (42)
add ram to existing (4)
Computer shutting down on its own (6)
EVGA 9800 gtx help with finding a goo.. (13)
"Documents and Settings" fo.. (7)
Delete an OS (18)
Outputing 1080p from my PC to my 720p.. (0)
panasonic dmr ez48veb recorder (0)
Need help getting speakers to work (2)
Nvidia GTX 260 problem (14)
Point and Shoot Camera Suggestions. (9)
Is the PSU I received dead? (16)
FreeAgent drive software not x64 comp.. (1)
Intel 5100 AGN issues fixed yet? (28)


All times are GMT -4. The time now is 05:21 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28