Focus method

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stefano

    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
  • Martin Honnen

    #2
    Re: Focus method



    Stefano wrote:
    [color=blue]
    > i want set focus element with element.focus()
    > but i have always this exception: "focus() is not a function"
    >
    > Can you help me?[/color]
    [color=blue]
    > I use Mozilla[/color]


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

    Martin Honnen


    Comment

    • Guy Roydor

      #3
      Re: Focus method

      focus est une méthode
      GR

      Stefano a écrit:[color=blue]
      > 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[/color]

      Comment

      • Stefano

        #4
        Re: Focus method

        Martin Honnen <mahotrash@yaho o.de> wrote in message news:<402387e1$ 1@olaf.komtel.n et>...[color=blue]
        > Stefano wrote:
        >[color=green]
        > > i want set focus element with element.focus()
        > > but i have always this exception: "focus() is not a function"
        > >
        > > Can you help me?[/color]
        >[color=green]
        > > I use Mozilla[/color]
        >
        >
        > What kind of element is that? It should work for form controls (input,
        > textarea, select).[/color]

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

        thanks

        Comment

        • Martin Honnen

          #5
          Re: Focus method



          Stefano wrote:
          [color=blue][color=green][color=darkred]
          >>>i want set focus element with element.focus()
          >>>but i have always this exception: "focus() is not a function"
          >>>[/color]
          >>
          >>[color=darkred]
          >>>I use Mozilla[/color]
          >>
          >>
          >>What kind of element is that? It should work for form controls (input,
          >>textarea, select).[/color]
          >
          >
          > paragraph, inline object (bold,italic... ), i think that these elements
          > aren't supported by focus().
          > Is it true?[/color]

          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


          Comment

          • Stefano

            #6
            Re: Focus method

            Martin Honnen <mahotrash@yaho o.de> wrote in message news:<4024f59e$ 1@olaf.komtel.n et>...[color=blue]
            > Stefano wrote:
            >[color=green][color=darkred]
            > >>>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).[/color]
            > >
            > >
            > > paragraph, inline object (bold,italic... ), i think that these elements
            > > aren't supported by focus().
            > > Is it true?[/color]
            >
            > 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?[/color]

            Yes, i have an editable iframe, i am writting an wysawyg editor
            but i don't use "ExecComman d". 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.insertNod e(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

            Comment

            Working...