K
kuna.subramaniyam
I have the following issue to solve:
Feature:
There is an html page that is generated server side with dynamic
content (mostly text content). The users should have a feature to
bookmark certain sections of the document for later reference.
Issue:
To accomplish this I need to have either of the following:
1) Allow the user to drag and drop (or click and drop) bookmark icons
and use AJAX to save the locations. When saving I need to save the
line beside the bookmark as well. Is there a function in javascript
that can map the mouse coordinates to the character positions or get
the closest text chunk?
2) Allow the user to highlight the text they want to bookmark and
click on a button to bookmark (again use AJAX to save the info). When
this is done, I need to place an icon beside the line. Is there a
function in Javascript that can give absolute/relative locations given
the selection?
Thanks in advance
Feature:
There is an html page that is generated server side with dynamic
content (mostly text content). The users should have a feature to
bookmark certain sections of the document for later reference.
Issue:
To accomplish this I need to have either of the following:
1) Allow the user to drag and drop (or click and drop) bookmark icons
and use AJAX to save the locations. When saving I need to save the
line beside the bookmark as well. Is there a function in javascript
that can map the mouse coordinates to the character positions or get
the closest text chunk?
2) Allow the user to highlight the text they want to bookmark and
click on a button to bookmark (again use AJAX to save the info). When
this is done, I need to place an icon beside the line. Is there a
function in Javascript that can give absolute/relative locations given
the selection?
Thanks in advance