How to move cursor to the end of the text in safari?

Discussion in 'Mac Programming' started by zengguang, Oct 19, 2007.

  1. zengguang macrumors newbie

    Joined:
    Oct 18, 2007
    #1
    hello everyone:
    i want to move cursor to the end of text.But when i use the createTextRange(),i find it does not work.please help me how to move cursor to the end of text in safari by javascript.
     
  2. bbarnhart macrumors 6502a

    bbarnhart

    Joined:
    Jan 16, 2002
    Location:
    Stilwell, Kansas
    #2
    I'm not sure what you're asking to do. Are you asking how to select a range of text in JavaScript? Any additional information would be helpful.
     
  3. toddburch macrumors 6502a

    Joined:
    Dec 4, 2006
    Location:
    Katy, Texas
    #3
    I think they want to position the caret at the end of a text string.

    Todd
     
  4. bbarnhart macrumors 6502a

    bbarnhart

    Joined:
    Jan 16, 2002
    Location:
    Stilwell, Kansas
    #4
    Oh, like it a edit box - such as the one I'm editing now?
     
  5. toddburch macrumors 6502a

    Joined:
    Dec 4, 2006
    Location:
    Katy, Texas
  6. zengguang thread starter macrumors newbie

    Joined:
    Oct 18, 2007
    #6
    Yes,I want to position the caret at the end of a text string.the text is a "<input type='text'.." .
    And ,I am trying to make some IE-only JScript work on Firefox and Safari.
    Does anyone know of equivalent methods for these functions?
    document.selection.createRange()
    document.body.createTextRange()
    please help me ,I use safari 3.0.3.
     
  7. Nugget macrumors 65816

    Nugget

    Joined:
    Nov 24, 2002
    Location:
    Houston Texas USA

Share This Page