why doesnt index.php?action=search not focus the textfield onLoad?

Started by supernova777, July 03, 2020, 11:13:33 AM

Previous topic - Next topic

supernova777

why doesnt index.php?action=search not focus the search input element as the page loads?

this makes no sense.. if i click search i want to type what i want to search for IMMEDIATELY
not click search, have to mouse to the input field, and then type;
especially if im using the search function continuosly

does this not make sense?

<input type="text" name="search" maxlength="100" size="40" class="input_text">

also why does it use name="search" instead of id="search" ???

Sir Osis of Liver

I would guess for the same reason loading main index doesn't focus login input field, it doesn't work in all browsers.  I use it for login on my forums because it's convenient for me using FF, and it does no harm in browsers that can't focus the field, it's just ignored.
When in Emor, do as the Snamors.
                              - D. Lister

Arantor

Quotealso why does it use name="search"

Because it's an HTML form, it *has* to do that. If you submit a form to the server, elements will be looked up with the *name* to find what to submit. The ID is never submitted to the server. That's literally how HTML forms have worked ever since HTML 2.0.

Quotethis makes no sense.. if i click search i want to type what i want to search for IMMEDIATELY

Disagree. When I do searches and actually go to the search page, invariably I want to put in the boards I care about first.
Holder of controversial views, all of which my own.


Advertisement: