On Thu, Apr 15, 2010 at 11:42 AM, Markus <[email protected]> wrote:
>> > Proposal: Automatically move thefocusto the first text field. For
>> > example, before logging in you have to move thefocusto the text
>> > field to type your username. Same for search. Google does this too, by
>> > the way.
>>
>> Looked into this--and it is a bit tricky. If could just add a js=focus
>> to the core I would do it. But from what I've read, this has to be set
>> in the body tag, not the input tag. I may chew on the idea some more
>> as it is a valuable one. And it may have to be done in the core to
>> really work right anyway. And BoltWire has the ability to dynamically
>> insert things in the body tag... But then again, you would have to
>> identify the form... I don't know...
>
> Is this really tricky? Maybe my imagination is wrong. If you were able
> to mark a form as focused using markup, you could only give such forms
> a name.
>
> [form]
> [text name js=focus]
> [form]
>
> If you find this, insert a name for the form and for the input field.
> For example "name=focused". If this happens on a page, add to the body
> tag:
>
> <body onLoad="document.forms.focused.focused.focus()">
>
> Am I ignoring any difficulties?

Well the big thing is the first [form] markup has already been
processed and it doesn't have a name attached to it. So by the time I
get to the [text...] it has no way to go back and insert the name into
the form.

Conceivably, thinking about it some more, we could setup some kind of
global tracking of all the forms and use it to do something like
document.forms[$counter]... It might be worth a try...

Cheers,
Dan

P.S. I've been busy the last few days and am just now getting caught
up. I'll see if I can't try something along these lines for the next
release. It would be a cool feature...

-- 
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en.

Reply via email to