Seeking a nationwide including provincial and municipal databases

Category: MS-SQL Server -> Applications Author: unbeatable9 Date: 2012-04-29 16:33:09
 
unbeatable9
2012-04-29 16:33:09
As stated, the data table contents not be too complex, cascading relationship either!

thanks!
huwangming
2012-04-29 16:38:00
Download Address:
liu56mingmingli
2012-04-29 16:46:30
first major program Tieshanglai see

[index.htm]

<HTML>
<HEAD>
<script language="javascript" defer="defer">
/ *
Description: three nationwide menu
Original: Stellar
Other Technical Articles: www.bjcan.com / hengxing / more.asp
Date :2006-1-20
* /
/ / package an xmlhttp to interact with the server
function ajax (objstr)
{
/ / Receive pass parameters
string = "objstr =" + escape (objstr);
/ / Create an object
var objXMLHTTP = null;
try
{
objXMLHTTP = new ActiveXObject ("MSXML2.XMLHTTP");
}
catch (e)
{
; try
{
objXMLHTTP = new ActiveXObject ("Microsoft.XMLHTTP");
}
catch (e2) {}
}
/ / send data
objXMLHTTP.open ("POST", "ajax. asp ", false);
objXMLHTTP.setrequestheader (" content-length ", string.length);
objXMLHTTP.setrequestheader ( "content-type", "application / x-www-form-urlencoded");
objXMLHTTP.send (string);
/ / get the server back bonus
return objXMLHTTP.responseText;
}

;
/ / package returned provincial data
function city (objstr, objselect)
{
; var _Array = ajax (objstr);
var objselect = eval ("document.all." + objselect);
/ / select value added emptied of all its value before
objselect.length = 0;
var split_Array = _Array.split ("|" );
for (i = 0; i <split_Array.length; i + +)
{
objselect . options.add (new Option (split_Array [i], split_Array [i]));
}

}

/ / Select to select the value of the return package
function getSelectValue (id)
{
var oSel = document.all (id);
return oSel.options [oSel.selectedIndex]. value;
}

/ / package changes at the provincial level menu generates events city1
function city1_change ()
{
city (getSelectValue ("city1"), "city2");
city (getSelectValue ("city2"), "city3" ;);
}

/ / package changes at the county level menu generates events city2
function city2_change ( )
{
city (getSelectValue ("city2"), "city3");
}
;
/ / initialize the page is first loaded select
city ("0", "city1");
city ​​(getSelectValue ("city1"), "city2");
city (getSelectValue ("city2"), "city3");

</script>
<title> nationwide linked </title>
</HEAD>
<body>
<table width="200" border="0" cellspacing="0" cellpadding="0"> ;
<form id="form">
<tr>
< ; td> <select id="city1" onChange="city1_change();"> </select> </td>
<td> ; <select id="city2" onChange="city2_change();"> </select> </td>
<td> < ; select id = "city3"> </select> </td>
</tr>
</form>
</table>
</body>
</HTML>

[ajax.asp ]

<! - # include file = "conn.asp" ->
<%
Response.CharSet = "gb2312" ;
area = ""
'-------------- obtain regional parameter
objstr = request ("objstr")
'-------------- according to the parameters read the corresponding lower area
set rs = server.createobject ("adodb.recordset")
rs.open " select * from area where fmc = '"& objstr &"' order by id ", conn, 3,3
'-------- ------ circulation of the array and returns the client
for i = 1 to rs.recordcount
if i = 1 then
area = rs ("mc")
else
area = area & "|" & rs ("mc")
end if
rs.movenext
next
'-------------- return data
response.write area
%>
Contact E-mail [email protected]
zzm053412
2012-04-29 17:04:53
directly to the National Bureau of Statistics to download ..
cara3lhsc
2012-04-29 17:24:26
Database: province name, City of
province city
pcy198611
2012-04-29 17:43:43