php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20105 on php.net why key shorcuts ?
Submitted: 2002-10-26 12:13 UTC Modified: 2004-01-19 10:14 UTC
From: damiencola at wanadoo dot fr Assigned:
Status: Closed Package: Website problem
PHP Version: 4.2.3 OS: all
Private report: No CVE-ID: None
 [2002-10-26 12:13 UTC] damiencola at wanadoo dot fr
Why putting shortcuts on php.net when the basic thing hasn't been done. Basic thing is like google.com and many others.
First you have to give a name to the search FORM, it hasn't got one at the moment, give it say MYFORM. The input textfield is actually nammed pattern.
then use this at the end of your html document :
<script>document.MYFORM.pattern.focus()</script>

this will give the focus to the search box.. honestly php.net I use it MAINLY for looking up php functions..
I know I could have installed a php help by now. but I suppose am not alone, potherwise why creating key shortcuts if not to make it more convenient to frequent web site users ? And if they're frequent it must be for the same reason as I..

Byebye and thank you so much, I don't know who to thank, but PHP is a benediction (gift god in english).

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-26 13:12 UTC] msopacua@php.net
To answer the why: because it's convenient.

As for you javascript:
Forms don't need names. They are accessible (and portably even) via document.forms[n] where n is a number.

I don't think we should explicetely set focus to the search box for a very simple reason: google is a search engine. php.net is not.

Setting focus in a site-wide header is counter productive, since it is set once the page is fully loaded. Due to network congestions, you can be typing in another formbox already and suddenly you're somewhere else.

There are already features in the site which allow easy access to functions, like so:
http://www.php.net/var_export

 [2002-10-26 17:00 UTC] sniper@php.net
reclassified.

 [2002-10-26 19:15 UTC] damiencola at wanadoo dot fr
I knew about forms being accessible by index, but it's easier with name to understand for those who didn't know about it.
It's possible to put the code right after the closing FORM tag, so the focus is executed immediatly after the form displays on the page.
As I said, perhaps many people use php.net via this text box, so perhaps it would be better to have the automatic focus AND the shortcuts..
Because the shorcuts alone won't help, when this will not be on a news at the top of the site..

Anyway, you do as you wish and php.net is very well as it is. It was a suggestion, not even a critic. Have a nice day.
 [2002-10-27 04:09 UTC] goba@php.net
As far as I see most of the visitors make use of the "php.net/funcname" feature to look up functions or search on the site. There are some shortcuts to make this even easier described on our tips page: php.net/tips. There a tip is included for IE5 Tools users to access the PHP functions list very quickly. BTW I am also thinking about releasing a PHP.net search bar for IE (similar what you see if you press the search button in IE), and someone also said he is working with IE bars (similar to Google bar) so if he has some free time, he can add a PHP.net bar to our toolbox :)

I'll leave this bug report open, so we can track these features...
 [2002-10-27 07:52 UTC] goba@php.net
I am just experimenting with IE Search Bars, and come up with this simple solution. Drag this link to your favorites/links list in IE and see what comes up if you click on it. 

<a href="javascript:void(open('http://php.net/searchbar.php','_search'))">PHP.net Search Bar</a>

If all goes well, this will go live with a news item on the php.net page tomorrow or today evening (CET).
 [2003-05-01 19:23 UTC] alindeman@php.net
Any update, goba?  Can we close this one?
 [2003-05-02 05:04 UTC] goba@php.net
Why I have not closed this bug, is because we can add a 
user setting to my php.net for users to set autofocus for the 
form entry. This would be disabled by default. I don't know if 
there is a real need for this however, but we can do this, if 
needed. 
 [2004-01-19 10:14 UTC] goba@php.net
Since no need seems to exist for the particular setting, I have mentioned in my last comment, and we have a lot of search options (with a new option just added :), I am closing this bug...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 29 07:01:31 2024 UTC