l*****0 发帖数: 179 | |
g*****g 发帖数: 34805 | 2 When you talk about popup, check javascript in that page.
【在 l*****0 的大作中提到】 : Hi, : I'm using JAVA URL to download some data from U.S Census. I have a problem. : http://factfinder.census.gov/servlet/AGSGeoAddressServlet?_MapEvent=&_category=&_subcategory=&_stateSelectedFromDropDown=Pennsylvania&context=ags&programYear=50%3A420&street=1383%2BLONG%2BRUN%2BRD&city=FRIEDENSBURG&states=Pennsylvania&zip=17933&geo_id=&_p : if you copy the above url and put them into the explore. you will find the : Census : website would pop up a window saying "Factfinder cannot locate the address : you : ent
|
l*****0 发帖数: 179 | 3 the server uses Javascript. I don't know how to deal with it in JAVA code.
【在 g*****g 的大作中提到】 : When you talk about popup, check javascript in that page.
|
g*****g 发帖数: 34805 | 4 Usually it will return some status code and when javascript finds that
status
it pops up. So in java code you check that status code too.
【在 l*****0 的大作中提到】 : the server uses Javascript. I don't know how to deal with it in JAVA code.
|
l*****0 发帖数: 179 | 5 in its page source code:
function checkAddressValidity() {
if (document.mapForm.IS_ADDRESS_VALID.value == "N" && document.mapForm.
street.value != "") {
alert("Factfinder cannot locate the address you entered.");
document.mapForm.street.focus()
}
what's the corresponding status code in JAVA? i mean, which class and which
method can do that?
【在 g*****g 的大作中提到】 : Usually it will return some status code and when javascript finds that : status : it pops up. So in java code you check that status code too.
|
g*****g 发帖数: 34805 | 6 parse the html, that's it.
which
【在 l*****0 的大作中提到】 : in its page source code: : function checkAddressValidity() { : if (document.mapForm.IS_ADDRESS_VALID.value == "N" && document.mapForm. : street.value != "") { : alert("Factfinder cannot locate the address you entered."); : document.mapForm.street.focus() : } : what's the corresponding status code in JAVA? i mean, which class and which : method can do that?
|
l*****0 发帖数: 179 | 7 the problem with parsing the html is that no matter whether the popup
windows comes up or not(meaning no matter whether the server found the
address), the return html page is the same. no error message in the returned
page.
【在 g*****g 的大作中提到】 : parse the html, that's it. : : which
|
g*****g 发帖数: 34805 | 8 document.mapForm.IS_ADDRESS_VALID.value == N
The form value is what you should check, if you don't develop
this website, you can't expect error code.
returned
【在 l*****0 的大作中提到】 : the problem with parsing the html is that no matter whether the popup : windows comes up or not(meaning no matter whether the server found the : address), the return html page is the same. no error message in the returned : page.
|
l*****0 发帖数: 179 | 9 the problem with parsing the html is that no matter whether the popup
windows comes up or not(meaning no matter whether the server found the
address), the return html page is the same. no error message in the returned
page.
【在 g*****g 的大作中提到】 : parse the html, that's it. : : which
|
l*****0 发帖数: 179 | 10 I fixed the problem. Thanks all. |