Jump to content

Recommended Posts

  • 4 weeks later...
Posted
I try to get cursor position inside a TUniHtmlMemo on client side with js.

The problem is that the TUniHtmlMemo I need to access the textarea of the component (ctl retun more div html tag).

Somebody can help?

 

function Onclick(sender)

{

 try

  {

    var ctl = document.getElementById(sender.id);

    if (ctl != null) 

    {  

      var startPos = ctl.selectionStart;

      /*var endPos = ctl.selectionEnd;*/

      alert(startPos);

    }  

  }

  catch(err)

  {

    txt="There was an error on this page.\n\n";

    txt+="Error description: " + err.message + "\n\n";

    txt+="Click OK to continue.\n\n";

    alert(txt);

  }   

}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...