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

Discussion in 'Javascript' started by sancha, Aug 5, 2005.

  1. sancha

    sancha Guest

    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
     
    sancha, Aug 5, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TN Bella
    Replies:
    1
    Views:
    2,506
    Edward
    Jun 18, 2004
  2. Mad Scientist Jr
    Replies:
    1
    Views:
    479
    Mad Scientist Jr
    Jul 15, 2004
  3. Guest
    Replies:
    2
    Views:
    167
    Bob Barrows [MVP]
    Feb 20, 2006
  4. S N

    Search pdf as well as database

    S N, Mar 20, 2009, in forum: ASP General
    Replies:
    4
    Views:
    144
    Daniel Crichton
    Mar 23, 2009
  5. Josselin
    Replies:
    0
    Views:
    115
    Josselin
    Sep 24, 2007
Loading...

Share This Page