Web Analytics Made Easy -
StatCounter case sensitivity & search form - CodingForum

Announcement

Collapse
No announcement yet.

case sensitivity & search form

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • case sensitivity & search form

    I've created an intranet search html/asp form querying an oracle database & now my users want a non case sensitive search....

    might it be possible to change the search criteria? i know the data is entered onto oracle via a dos-based front end that I have no control over & that it permits upper or lower case. i guess if I can't design a search with non case sensitivity searching by upper & lower case would be good... any ideas? I guess I'd have to take the string entered into the html form & use javascript to convert it to upper & also to lower & then pass the strings as search criteria & dispaly the results within an ASP page...

    Any pointers would be great!!!

  • #2
    You can use the functions toUpperCase() or toLowerCase() to get the job done. I will attatch a simple example of how it works. Have Fun!

    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script language="JavaScript" >
    function makeAllCaps(){
    var string = document.form.text1.value;
    string = string.toUpperCase();
    document.all['Layer1'].innerHTML = "<p>"+string+"</p>";
    }
    function makeAllLowerCase(){
    var string = document.form.text1.value;
    string = string.toLowerCase();
    document.all['Layer1'].innerHTML = "<p>"+string+"</p>";
    }

    </script>
    </head>

    <body>
    <form action="" method="get" name="form">
    type capitals <input name="text1" type="text">
    </form>
    <a href="#" onClick="makeAllCaps()">Convert to all caps</a>
    <a href="#" onClick="makeAllLowerCase()">Convert to lower case</a>

    <div id="Layer1" style="position:absolute; width:290px; height:115px; z-index:1; left: 16px; top: 107px;"></div>
    </body>
    </html>
    I try to convince 'em that I am computer geek, but I just can't do it. Why? Oh why?

    Comment


    • #3
      Please do not cross post questions in multiple forums

      Comment

      Working...
      X