简体   繁体   中英

Need Native Android/Java Method to Query Online Search Field

I'd like to query a .cfm page via Android but I'm not sure what method I should be using to do so - any suggestions?

Example:

http://www.sheriff.org/apps/arrest/results.cfm?lname=smith&fname=

PS

Would I use something along the lines of this?

http://androidexample.com/AsyncroTask_Example_To_Get_Server_Data_-_Android_Example/index.php?view=article_discription&aid=59&aaid=84

use an ajax call with the url with the appropriate first and last name parameters, and then extract the result table from the return value.

see a working jsfiddle sample here: http://jsfiddle.net/FhHXK/

code:

$('#get').click(function () {
    $.ajax({
        url:'http://www.sheriff.org/apps/arrest/results.cfm?lname=a&fname=b',
        type: 'GET'
    }).done(function (data){
        var result = $(data).find('table.datagrid');
        console.log(result.html());
        $('body').append(result);
    });
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM