Search only the page (need search of value of textboxes as well)

S

sancha

I have a prompt in which the user inputs the search field.
I would like to highlight the places where the search matches.

The problem i am facing is that the page consists of text on the page
as well as text in textboxes and text areas and combo boxes.

I tried using
var searchrange = window.document.body.createTextRange()
and searching within that.
this gives me only the text on the screen and the text areas and not
the text boxes. the text in the range shows the text on alert but
dosent search within that.
alert(searchrange.txt);

shows the values but dosent find them

Please help
Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top