Well...I'm new to this but I think getSelection returns the user selection. In my case I need a function to: 1) locate the string, 2) highlight it, and 3) scroll the page (if necessary) so that the string is in the viewing portion of the window without any user intervention.
I can use indexOf()...
When the page is loaded I have a function that runs on the OnLoad event. This function searches for a specific text string. WHen it finds the string it highlights the string.
I can do this in IE using createTextRange. I can do it in Firefox using x.find(str...), but both fail in Safari (both...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.