-
Dynamic highlight of text using mouse in HTML page
I'm writing a web application and one of the things it has to do is the ability for a user to highlight text on a page dynamically. For instance, if there is the sentence 'My mom is a very pretty lady' and the instructions are to highlight the nouns in the sentence. The user would use the mouse and highlight 'mom' and 'lady'. The background for those words would turn yellow. Then the user clicks a submit button and the page verifies what is highlighted is indeed the nouns.
Eventually I will have to have the user highlight a bunch of terms then add them to some type of list (stored in the database).
-
-
It's possible to do that. I don't know how exactly, but I've seen it done.
These pages will be of help, however.
http://www.quirksmode.org/dom/range_intro.html
http://johannburkard.de/blog/program...ry-plugin.html
http://www.quirksmode.org/css/selection.html
Particularly, the first one.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks