Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy 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
    Regular Coder
    Join Date
    Jun 2002
    Location
    Provo, UT
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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>

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    The Planet Earth Code Poet: True
    Posts
    282
    Thanks
    0
    Thanked 1 Time in 1 Post
    Please do not cross post questions in multiple forums


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •