Results 1 to 3 of 3
  1. #1
    tek0011 is offline Member
    Join Date
    Nov 2009
    Posts
    5
    Rep Power
    0

    Default Java Search Query Question

    I have noooo idea if I am even posting this in the correct area, let alone the correct site. If not I apologize and maybe someone could direct me elsewhere.
    I am trying to add a custom search into my site.

    jeffknowsloans.xom Jeff Knows Loans - M&M Mortgage

    you can see it about the middle of the page.

    I am using the following script to do so.


    Java Code:
    <script type="text/javascript">
    function dosearch() {
    var sf=document.searchform;
    var submitto = sf.sengines.options[sf.sengines.selectedIndex].value + escape(sf.searchterms.value);
    window.location.href = submitto;
    return false;
    }
    </script>
    <form name="searchform" onSubmit="return dosearch();">
    Select County
    <select name="sengines">
    <option value="hxxp://www2.co.washington.mn.us/opip/mod/addresssrch/result.asp?housenum=&street=" selected>Washington</option>
    <option value="hxxp://rrinfo.co.ramsey.mn.us/public/characteristic/PropertySearchResults.aspx?pin=&Nbr=&Street=&pg=1" selected>Ramsey</option>
    </select>
    Street Address:
    <input type="text" name="searchterms">
    <input type="submit" name="SearchSubmit" value="Search">
    </form>
    here is the problem i am running into.
    I dont know how to ignore or add certain parts of the search when it sends. for example. take a look at

    Java Code:
    <option value="hxxp://rrinfo.co.ramsey.mn.us/public/characteristic/PropertySearchResults.aspx?pin=&Nbr=&Street=&pg=1" selected>Ramsey</option>
    When i try to do a search under this drop down selection it doesnt work. because it needs the &pg=1 to be added to the users request.
    Meaning if I set it to
    Java Code:
    hxxp://rrinfo.co.ramsey.mn.us/public/characteristic/PropertySearchResults.aspx?pin=&Nbr=&Street=
    they type in their street name and the street name inputs into the search query but it wont fully work because it doesnt add the &pg=1 after it all.
    how in the world do I get it to add things like that?

    another example

    taking a look at

    Java Code:
    <option value="hxxp://www2.co.washington.mn.us/opip/mod/addresssrch/result.asp?housenum=&street=" selected>Washington</option>
    this search function should technically be
    Java Code:
    <option value="hxxp://www2.co.washington.mn.us/opip/mod/addresssrch/result.asp?" selected>Washington</option>
    however since i dont know how to add certain functions to the search i have to skip the housenum option. that means my customers cant search by street number. I want them to be able to type in their house number and their street address and it will change to what each seperate (outside) search engine needs.

    Does this make any sense at all?

  2. #2
    ocean is offline Senior Member
    Join Date
    Sep 2009
    Location
    Sweden/Borås
    Posts
    107
    Rep Power
    0

    Default

    Dont think this is the site for you. Java and JavaScript aint the same language. Hope you find an answer to your problem.

    Regards / ocean

  3. #3
    tek0011 is offline Member
    Join Date
    Nov 2009
    Posts
    5
    Rep Power
    0

    Default

    thanks. as you can tell im new to this. so i need a JavaScript forum? lol.

Similar Threads

  1. Replies: 0
    Last Post: 10-29-2009, 09:28 AM
  2. Help with query (new to java!)
    By gpittingale in forum New To Java
    Replies: 3
    Last Post: 02-15-2009, 09:14 AM
  3. Newbie search array question
    By CirKuT in forum New To Java
    Replies: 19
    Last Post: 09-14-2008, 06:26 AM
  4. Replies: 5
    Last Post: 08-26-2008, 03:43 PM
  5. oracle query with date question
    By orchid in forum JDBC
    Replies: 1
    Last Post: 05-09-2007, 12:10 AM

Posting Permissions

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