|
-
Jul 31st, 2006, 03:41 AM
#1
Re: Dropdown Box
Make your own PHP script which will do the final formatting and redirection to the proper url, because the input fields also vary depending on the search engine. For the least, I wouldn't rely on JavaScript to change the field attributes depending on the selected search engine; I for one use NoScript extension by default, thus it would be frustrating if the search didn't work. With a PHP script there will be no problems.
Also, be careful with character code pages and encodings! Wikipedia takes UTF-8, Google can take UTF-8 or ISO-8859-1... so if your page's content encoding isn't UTF-8, you need to use utf8encode() in the PHP script (and even then it might not work 100% correctly). Although I highly recommend using UTF-8 as the default page encoding, less problems with non-English characters overall.
-
Jul 31st, 2006, 03:52 AM
#2
Thread Starter
Lively Member
Re: Dropdown Box
Thanks for your reply Merri! I was actually thinking about using Javascript to do the redirect, so thanks for the wake-up call! Wasn't thinking about all of you with No Script extension.
Also, I wasn't aware of the different encodings among the search engines. That may be a challenge! I'll update you on the process as I get to work on the script, and (surely) run into problems! 
Edit: First encounter already! Any tips on the redirecting in the script?! The problem here, is that if I use:
PHP Code:
header("location: [some-url]");
.. then this is done with the header, meaning before the code is being processed. This way, I'll never get to evaluate which engine the user selected, and might as well pick one for him/her.
Last edited by Mutuz; Jul 31st, 2006 at 04:08 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|