Webmaster Forum Rules | Posting Guide | Contact Us | Testimonials | Contributing Geek Program | Advertise on Geek/Talk
Welcome to the GeekTalk Webmaster Discussion Forums from GeekVillage.com

Click Here To Register. It's Free!

Go Back   geek/talk: Signature-free discourse for serious web publishers > YOUR CREATION: Building & Maintaining A Web Site > Web Design and Webmaster Issues
User Name
Password
Register FAQ Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 05-30-2001, 07:25 PM   #1
DJ_B
Registered User
 
Join Date: Aug 2000
Posts: 260
Unhappy Text field + search= problem

Howdy peeps!

I gots a problem, which I dont know how to solve. On my site I have an area where people can search my site for software. There is on text field to input search terms, and one pull down menu to search a category, and then a submit button (you can see what I mean by going to www.appleprograms.com, look at the top of the page). What I want to do is give that text field a default value of "Software Search!". But.....If I do that, if you go to search for a category, it will also search for "software search". So basically, what I need an answere to is...

Does anyone know how to ignore a default text value when clicking submit, without ignoring the text value if it is not default?

Thanks!


[This message has been edited by DJ_B (edited 05-30-2001).]
DJ_B is offline   Reply With Quote
Old 05-31-2001, 06:06 PM   #2
DJ_B
Registered User
 
Join Date: Aug 2000
Posts: 260
Unhappy

bump
DJ_B is offline   Reply With Quote
Old 06-02-2001, 10:23 AM   #3
JakeJeck
Registered User
 
Join Date: Mar 2000
Location: Milwaukee WI
Posts: 338
Unhappy

All you have to do is an IF statement inside your search engine. Make a default(BLANK) dropdown option with a value of "".

IF ($dropdown)
$search_term = $dropdown;
else
$search_term = $textbox;

This would cause the dropdown to be used if both were selected. So you might want to put the word OR between the text field and the drop down box. (enter text OR use the dropdown).
JakeJeck is offline   Reply With Quote
Old 06-06-2001, 01:00 PM   #4
drisley
Registered User
 
Join Date: May 2001
Location: Lutz, FL
Posts: 4
Unhappy

You should also be able to throw in a simple IF statement that would simply ignore the string value of "Software Search".

------------------
Owner/Operator
PC Media, Inc.
http://www.pcmedianet.com
Our flagship site: http://www.pcmech.com
Earn $$ by referring customers for PHP Development!
http://www.pcmedianet.com/work.html
drisley is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
getAttribute() question aredamkrik Web Development - Programming / Coding 11 08-27-2005 01:16 AM
Inserting Stuff into Text Field BobDoleX Web Development - Programming / Coding 2 08-04-2003 05:52 PM
Problem with domain name or ISP inogenius Web Design and Webmaster Issues 1 10-24-2001 02:14 PM
I really need some help here.. PHP and MySQL eca Web Development - Programming / Coding 9 09-23-2001 07:17 PM
Click search field, default text erases. DJ_B Web Design and Webmaster Issues 3 06-10-2001 07:29 PM

Please support our advertisers. They ensure our survival.

All times are GMT -5. The time now is 02:51 AM.


GeekVillage.com is copyright © 1998-2015 Curiosity Cave - Science gifts for clever kids. All rights reserved.
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.