470,600 Members | 1,480 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,600 developers. It's quick & easy.

Focus method

Hi,

i want set focus element with element.focus()
but i have always this exception: "focus() is not a function"

Can you help me?

Thanks
I use Mozilla

stefano
Jul 20 '05 #1
5 1496


Stefano wrote:
i want set focus element with element.focus()
but i have always this exception: "focus() is not a function"

Can you help me? I use Mozilla

What kind of element is that? It should work for form controls (input,
textarea, select).
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
focus est une méthode
GR

Stefano a écrit:
Hi,

i want set focus element with element.focus()
but i have always this exception: "focus() is not a function"

Can you help me?

Thanks
I use Mozilla

stefano


Jul 20 '05 #3
Martin Honnen <ma*******@yahoo.de> wrote in message news:<40********@olaf.komtel.net>...
Stefano wrote:
i want set focus element with element.focus()
but i have always this exception: "focus() is not a function"

Can you help me?

I use Mozilla

What kind of element is that? It should work for form controls (input,
textarea, select).


paragraph, inline object (bold,italic...), i think that these elements
aren't supported by focus().
Is it true?

thanks
Jul 20 '05 #4


Stefano wrote:
i want set focus element with element.focus()
but i have always this exception: "focus() is not a function"


I use Mozilla

What kind of element is that? It should work for form controls (input,
textarea, select).

paragraph, inline object (bold,italic...), i think that these elements
aren't supported by focus().
Is it true?


Well, a paragraph element in a normal HTML document can't have focus,
neither by user action nor by script.
Or are you having an editable iframe?
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #5
Martin Honnen <ma*******@yahoo.de> wrote in message news:<40********@olaf.komtel.net>...
Stefano wrote:
i want set focus element with element.focus()
but i have always this exception: "focus() is not a function"

I use Mozilla
What kind of element is that? It should work for form controls (input,
textarea, select).

paragraph, inline object (bold,italic...), i think that these elements
aren't supported by focus().
Is it true?


Well, a paragraph element in a normal HTML document can't have focus,
neither by user action nor by script.
Or are you having an editable iframe?


Yes, i have an editable iframe, i am writting an wysawyg editor
but i don't use "ExecCommand". I want that if user clicks "bold"
button of editor (for example), my editor inserts or removes an
element "B".
My problem is: How can i do for insert an element ? i have tried with
range.insertNode(newc) but newc is empty (because user is writting)
and doesn't insert in a DOM.
Excusme for my English...
Thank for your help.
Stefano
Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

31 posts views Thread by Benno Bös | last post: by
3 posts views Thread by bradwiseathome | last post: by
3 posts views Thread by VA | last post: by
2 posts views Thread by Jesper | last post: by
1 post views Thread by Praveena.Alapati | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.