Results 1 to 10 of 10
  1. tycoonbob's Avatar
    Posts
    47 Posts
    Global Posts
    49 Global Posts
       #1  
    Hello again. So I am working on making an app, and I need a little help with the HTML coding for a few objects. First off, let me let it be known that I am a correction officer in a Medium Security Prison in KY. I am trying to make an app that utilizes Kentucky Offender Online Lookup, or KOOL. This way, I can type in an inmates name, see their charges, sentence length, incarseration date, etc. This is public accessible information via the dept of corrections gov website, so I see no problems being able to make an app with this.

    So if you click that link above, you notice that there is a box to input a first and last name, which is all I am interested in having. I know how to make object boxes to input data and say, have it emailed somewhere, but I am not sure how to make the boxes I have in my app submit the same data to where the boxes on the website submit, and also pull the information that the site would bring. If I can get help with submitting the search items, then I can spend some more time making it a little nicer. I will attach my current index.html file, and someone will hopefully help me out? Once I learn this, I can start making more apps.
    Attached Files Attached Files
    Last edited by tycoonbob; 07/08/2009 at 04:01 PM.
  2. #2  
    Hey tycoonbob!

    I'm having similar troubles actually. I've been asking around the forums a bit and have gotten a vague idea of how to go about doing this. Take a look here. This was a thread I started asking people around for help in doing just what you are, submitting a search term, getting back certain information and going through this information to display only the specific desired information. Look through it, sorry i'm not more specific and helpful, but I myself am in a similar fix...

    Hope this helps!

    Good luck!
  3. tycoonbob's Avatar
    Posts
    47 Posts
    Global Posts
    49 Global Posts
       #3  
    Anything that can get me learning or making progress is help, so long as I'm not sitting around with my thumb up my ****. Thanks, and I will be checking this out right now!
  4. #4  
    What you really need is access to a public API made available by a web service (HTTP REST, SOAP, etc.) However, it doesn't look like they have that available.

    Your other option is to screen scrape. Basically, you'll create an Ajax request (Prototype JavaScript framework: Ajax.Ajax.Request) that mimics the search form post and parse the response. If the response is valid XHTML you can treat is as XML and use XPath to select the nodes you want; otherwise you're probably going to have to attempt to use regular expressions to extract the data. Screen scraping is generally not an easy task, so be warned.

    EDIT: you should also verify with the department that your external consumption does not violate their terms of use. Accessing the search from a page they host internally is NOT the same as recreating the search externally. It's also important to note that their search request and response formats could change at any time thereby breaking your application.
    Last edited by burntsky; 07/08/2009 at 05:15 PM. Reason: terms of use warning
  5. #5  
    Another solution to this is doing a POST instead of a GET from your ap to the website.


    <FORM name="quicksearch" method="post" action="http:*****.kentucky.gov/Portal/Search.aspx" id="quicksearch">

    and use the same inputs names on the post.

    Last Name:
    <input name="LName" maxlength="27">
    <input name="Alias" type="checkbox">
    Search Aliases First Name:
    <input name="FName" maxlength="12">
    Middle Name:
    <input name="MName" maxlength="8">
    Record Sort Order:
    <select name="Order">
    <option>Default (Inmate Last Name, First Name)</option>
    <option>Inmate SPN</option>
    <option>Inmate Inst. then Inmate SPN</option>
    <option>Inmate Inst. then Inmate Last Name, Inmate First Name</option>
    </select>


    I hope that helps. The ap would open a new browser window I believe, but thats the betss olution if you dont have access to some sort of API.


    ps: reemplace the ***** with //www (I cant post links yet)


    Dan
  6. tycoonbob's Avatar
    Posts
    47 Posts
    Global Posts
    49 Global Posts
       #6  
    Uh...not sure I am following to well. Nothing I am trying is working right, and I don't know what else to do..
  7. #7  
    Could you copy and paste the entire index.html that you are working on, I'll edit it for you.
  8. tycoonbob's Avatar
    Posts
    47 Posts
    Global Posts
    49 Global Posts
       #8  
    Will do, but like I said, I'm having trouble getting this to work. Once this works I can spend time playing with it making it smoother and look better. But here is what I am working with..

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    <title>KOOL</title>


    <script src="/usr/palm/frameworks/mojo/mojo.jsjsjs&$quot$; $type$=&$quot$;$text$/$javascript$&$quot$; $x$-$mojo$-$version$=&$quot$;$1$&$quot$;&$gt$;&$lt$;/$script$&$gt$;


    <style type="text/css">
    #content {
    text-align: center;
    }

    #app-footer {
    margin-top: 25px;
    font-size: 80%;
    text-align: center;
    }
    </style>

    </head>

    <body>


    <div class="palm-page-header">
    <div class="palm-page-header-wrapper">
    <div class="title">
    <center>Kentucky Offender Online Look-up</center>
    </div>
    </div>
    </div>


    <div id="content">
    <FORM name="quicksearch" method="post" action="http://apps.corrections.ky.gov/KOOL/ioffsrch.asp" id="quicksearch">
    First Name: <input name="First Name" value="" size="10"><br>
    Last Name: <input name="Last Name" value="" size="10"><br>
    <center><input type="submit" id="Look-Up"></center>
    </form>
    <img src="icon.png"/>
    </div>


    <div id="app-footer">
    <hr/>
    &copy; 2009 <a href="http://www.facebook.com/tycoonbob/">KOOL by Derek Horn</a>
    </div>

    </body>
    </html>
  9. #9  
    The following code should do it, I tested it. I had the wrong url before. This should open a new browser window in the ap though, since there is not an api for it. Good luck.

    All it needs is some cosmetic work now~


    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    <title>KOOL</title>


    <script src="/usr/palm/frameworks/mojo/mojo.jsjsjs&$quot$; $type$=&$quot$;$text$/$javascript$&$quot$; $x$-$mojo$-$version$=&$quot$;$1$&$quot$;&$gt$;&$lt$;/$script$&$gt$;


    <style type="text/css">
    #content {
    text-align: center;
    }

    #app-footer {
    margin-top: 25px;
    font-size: 80%;
    text-align: center;
    }
    </style>

    </head>

    <body>


    <div class="palm-page-header">
    <div class="palm-page-header-wrapper">
    <div class="title">
    <center>Kentucky Offender Online Look-up</center>
    </div>
    </div>
    </div>


    <div id="content">
    <form action='http://apps.corrections.ky.gov/KOOL/ioffres.asp' method=post>
    <br>
    <input type='hidden' name='Action' value='Search'>
    Last Name:
    <input Name = 'LName' MaxLength = 27>
    <input name='Alias' type=checkbox>
    Search Aliases<BR>
    First Name:
    <input Name = 'FName' Maxlength = 12>
    <BR>
    Middle Name:
    <input Name = 'MName' Maxlength = 8>
    <BR>
    Record Sort Order:
    <select name='Order'>
    <option>Default (Inmate Last Name, First Name)
    <option>Inmate SPN
    <option>Inmate Inst. then Inmate SPN
    <option>Inmate Inst. then Inmate Last Name, Inmate First Name
    </select>

    <br>
    <input type='SUBMIT' Value='Search Data'>
    </form>
    <img src="icon.png"/>
    </div>


    <div id="app-footer">
    <hr/>
    &copy; 2009 <a href="http://www.facebook.com/tycoonbob/">KOOL by Derek Horn</a>
    </div>

    </body>
    </html>
  10. tycoonbob's Avatar
    Posts
    47 Posts
    Global Posts
    49 Global Posts
       #10  
    Awesome. I tested out the html file and it works pretty good. I also see and understand what I had wrong, so thank you very much. I'm trying to teach myself HTML/CSS/JSJSJS $all$ $at$ $once$, $hehe$.

    I am having a problem with my Palm Emulator, though. When I open it, a box will pop up saying "VirtualBox - Runtime Error" "Cannot Access the Kernel Driver"

    any idea why? I have VBVBVB $v3$.$0$.$0$ $and$ $I$ $think$ $that$ $is$ $the$ $problem$, $as$ $I$ $think$ $I$ $saw$ $somewhere$ $it$ $needs$ $2$.$6$.$x$ $or$ $something$ $like$ $that$, $but$ $I$'$m$ $not$ $sure$ $where$ $to$ $get$ $that$ $version$.

Posting Permissions