Avatar billede syscom Nybegynder
05. juni 2001 - 15:18 Der er 6 kommentarer og
1 løsning

Indtast postnr > led i db > indsæt bynavn i form - uden at forlade siden?

Er det muligt, og hvordan, at lave et system som ved indtastning af postnr i et form felt, herefter tjekker i en db, hvorefter den så smider bynavnet ind i et indput ved siden af f.eks. uden at den på noget tidspunkt forlader siden?
Avatar billede netsrac Praktikant
05. juni 2001 - 15:21 #1
Nej, men du kan bruge denne:

<HTML>
<HEAD>
<TITLE>:-)</TITLE>
<STYLE>
body { font-family: Tahoma; font-size: 13px; }
TD { font-family: Tahoma; font-size: 13px; }
input { width: 200px; }
textarea { width: 200px; }
input.knap { width: 100px; }
</STYLE>
<SCRIPT LANGUAGE=\"Javascript\">
function kundenr()
{
document.opretkunde.kundenummer.value = document.opretkunde.telefon.value;
}
postnr = new Array();
postnr[1050] = \'Kbh. K\';
postnr[1051] = \'Kbh. K\';
postnr[1052] = \'Kbh. K\';
postnr[1053] = \'Kbh. K\';
postnr[1054] = \'Kbh. K\';
postnr[1055] = \'Kbh. K\';
postnr[1056] = \'Kbh. K\';
postnr[1057] = \'Kbh. K\';
postnr[1058] = \'Kbh. K\';
postnr[1059] = \'Kbh. K\';
postnr[1060] = \'Kbh. K\';
postnr[1061] = \'Kbh. K\';
postnr[1062] = \'Kbh. K\';
postnr[1063] = \'Kbh. K\';
postnr[1064] = \'Kbh. K\';
postnr[1065] = \'Kbh. K\';
postnr[1066] = \'Kbh. K\';
postnr[1067] = \'Kbh. K\';
postnr[1068] = \'Kbh. K\';
postnr[1069] = \'Kbh. K\';
postnr[1070] = \'Kbh. K\';
postnr[1071] = \'Kbh. K\';
postnr[1072] = \'Kbh. K\';
postnr[1073] = \'Kbh. K\';
postnr[1074] = \'Kbh. K\';
postnr[1100] = \'Kbh. K\';
postnr[1101] = \'Kbh. K\';
postnr[1102] = \'Kbh. K\';
postnr[1103] = \'Kbh. K\';
postnr[1104] = \'Kbh. K\';
postnr[1105] = \'Kbh. K\';
postnr[1106] = \'Kbh. K\';
postnr[1107] = \'Kbh. K\';
postnr[1110] = \'Kbh. K\';
postnr[1111] = \'Kbh. K\';
postnr[1112] = \'Kbh. K\';
postnr[1113] = \'Kbh. K\';
postnr[1114] = \'Kbh. K\';
postnr[1115] = \'Kbh. K\';
postnr[1116] = \'Kbh. K\';
postnr[1117] = \'Kbh. K\';
postnr[1118] = \'Kbh. K\';
postnr[1119] = \'Kbh. K\';
postnr[1120] = \'Kbh. K\';
postnr[1121] = \'Kbh. K\';
postnr[1122] = \'Kbh. K\';
postnr[1123] = \'Kbh. K\';
postnr[1124] = \'Kbh. K\';
postnr[1125] = \'Kbh. K\';
postnr[1126] = \'Kbh. K\';
postnr[1127] = \'Kbh. K\';
postnr[1128] = \'Kbh. K\';
postnr[1129] = \'Kbh. K\';
postnr[1130] = \'Kbh. K\';
postnr[1131] = \'Kbh. K\';
postnr[1150] = \'Kbh. K\';
postnr[1151] = \'Kbh. K\';
postnr[1152] = \'Kbh. K\';
postnr[1153] = \'Kbh. K\';
postnr[1154] = \'Kbh. K\';
postnr[1155] = \'Kbh. K\';
postnr[1156] = \'Kbh. K\';
postnr[1157] = \'Kbh. K\';
postnr[1158] = \'Kbh. K\';
postnr[1159] = \'Kbh. K\';
postnr[1160] = \'Kbh. K\';
postnr[1161] = \'Kbh. K\';
postnr[1162] = \'Kbh. K\';
postnr[1163] = \'Kbh. K\';
postnr[1164] = \'Kbh. K\';
postnr[1165] = \'Kbh. K\';
postnr[1166] = \'Kbh. K\';
postnr[1167] = \'Kbh. K\';
postnr[1168] = \'Kbh. K\';
postnr[1169] = \'Kbh. K\';
postnr[1170] = \'Kbh. K\';
postnr[1171] = \'Kbh. K\';
postnr[1172] = \'Kbh. K\';
postnr[1173] = \'Kbh. K\';
postnr[1174] = \'Kbh. K\';
postnr[1175] = \'Kbh. K\';
postnr[1200] = \'Kbh. K\';
postnr[1201] = \'Kbh. K\';
postnr[1202] = \'Kbh. K\';
postnr[1203] = \'Kbh. K\';
postnr[1204] = \'Kbh. K\';
postnr[1205] = \'Kbh. K\';
postnr[1206] = \'Kbh. K\';
postnr[1207] = \'Kbh. K\';
postnr[1208] = \'Kbh. K\';
postnr[1209] = \'Kbh. K\';
postnr[1210] = \'Kbh. K\';
postnr[1211] = \'Kbh. K\';
postnr[1212] = \'Kbh. K\';
postnr[1213] = \'Kbh. K\';
postnr[1214] = \'Kbh. K\';
postnr[1215] = \'Kbh. K\';
postnr[1216] = \'Kbh. K\';
postnr[1217] = \'Kbh. K\';
postnr[1218] = \'Kbh. K\';
postnr[1219] = \'Kbh. K\';
postnr[1220] = \'Kbh. K\';
postnr[1221] = \'Kbh. K\';
postnr[1250] = \'Kbh. K\';
postnr[1251] = \'Kbh. K\';
postnr[1252] = \'Kbh. K\';
postnr[1253] = \'Kbh. K\';
postnr[1254] = \'Kbh. K\';
postnr[1255] = \'Kbh. K\';
postnr[1256] = \'Kbh. K\';
postnr[1257] = \'Kbh. K\';
postnr[1258] = \'Kbh. K\';
postnr[1259] = \'Kbh. K\';
postnr[1260] = \'Kbh. K\';
postnr[1261] = \'Kbh. K\';
postnr[1262] = \'Kbh. K\';
postnr[1263] = \'Kbh. K\';
postnr[1264] = \'Kbh. K\';
postnr[1265] = \'Kbh. K\';
postnr[1266] = \'Kbh. K\';
postnr[1267] = \'Kbh. K\';
postnr[1268] = \'Kbh. K\';
postnr[1270] = \'Kbh. K\';
postnr[1271] = \'Kbh. K\';
postnr[1300] = \'Kbh. K\';
postnr[1301] = \'Kbh. K\';
postnr[1302] = \'Kbh. K\';
postnr[1303] = \'Kbh. K\';
postnr[1304] = \'Kbh. K\';
postnr[1305] = \'Kbh. K\';
postnr[1306] = \'Kbh. K\';
postnr[1307] = \'Kbh. K\';
postnr[1308] = \'Kbh. K\';
postnr[1309] = \'Kbh. K\';
postnr[1310] = \'Kbh. K\';
postnr[1311] = \'Kbh. K\';
postnr[1312] = \'Kbh. K\';
postnr[1313] = \'Kbh. K\';
postnr[1314] = \'Kbh. K\';
postnr[1315] = \'Kbh. K\';
postnr[1316] = \'Kbh. K\';
postnr[1317] = \'Kbh. K\';
postnr[1318] = \'Kbh. K\';
postnr[1319] = \'Kbh. K\';
postnr[1320] = \'Kbh. K\';
postnr[1321] = \'Kbh. K\';
postnr[1322] = \'Kbh. K\';
postnr[1323] = \'Kbh. K\';
postnr[1324] = \'Kbh. K\';
postnr[1325] = \'Kbh. K\';
postnr[1326] = \'Kbh. K\';
postnr[1327] = \'Kbh. K\';
postnr[1328] = \'Kbh. K\';
postnr[1329] = \'Kbh. K\';
postnr[1350] = \'Kbh. K\';
postnr[1352] = \'Kbh. K\';
postnr[1353] = \'Kbh. K\';
postnr[1354] = \'Kbh. K\';
postnr[1355] = \'Kbh. K\';
postnr[1356] = \'Kbh. K\';
postnr[1357] = \'Kbh. K\';
postnr[1358] = \'Kbh. K\';
postnr[1359] = \'Kbh. K\';
postnr[1360] = \'Kbh. K\';
postnr[1361] = \'Kbh. K\';
postnr[1362] = \'Kbh. K\';
postnr[1363] = \'Kbh. K\';
postnr[1364] = \'Kbh. K\';
postnr[1365] = \'Kbh. K\';
postnr[1366] = \'Kbh. K\';
postnr[1367] = \'Kbh. K\';
postnr[1368] = \'Kbh. K\';
postnr[1369] = \'Kbh. K\';
postnr[1370] = \'Kbh. K\';
postnr[1371] = \'Kbh. K\';
postnr[1400] = \'Kbh. K\';
postnr[1401] = \'Kbh. K\';
postnr[1402] = \'Kbh. K\';
postnr[1403] = \'Kbh. K\';
postnr[1404] = \'Kbh. K\';
postnr[1405] = \'Kbh. K\';
postnr[1406] = \'Kbh. K\';
postnr[1407] = \'Kbh. K\';
postnr[1408] = \'Kbh. K\';
postnr[1409] = \'Kbh. K\';
postnr[1410] = \'Kbh. K\';
postnr[1411] = \'Kbh. K\';
postnr[1412] = \'Kbh. K\';
postnr[1413] = \'Kbh. K\';
postnr[1414] = \'Kbh. K\';
postnr[1415] = \'Kbh. K\';
postnr[1416] = \'Kbh. K\';
postnr[1417] = \'Kbh. K\';
postnr[1418] = \'Kbh. K\';
postnr[1419] = \'Kbh. K\';
postnr[1420] = \'Kbh. K\';
postnr[1421] = \'Kbh. K\';
postnr[1422] = \'Kbh. K\';
postnr[1423] = \'Kbh. K\';
postnr[1424] = \'Kbh. K\';
postnr[1425] = \'Kbh. K\';
postnr[1426] = \'Kbh. K\';
postnr[1427] = \'Kbh. K\';
postnr[1428] = \'Kbh. K\';
postnr[1429] = \'Kbh. K\';
postnr[1430] = \'Kbh. K\';
postnr[1431] = \'Kbh. K\';
postnr[1432] = \'Kbh. K\';
postnr[1433] = \'Kbh. K\';
postnr[1450] = \'Kbh. K\';
postnr[1451] = \'Kbh. K\';
postnr[1452] = \'Kbh. K\';
postnr[1453] = \'Kbh. K\';
postnr[1454] = \'Kbh. K\';
postnr[1455] = \'Kbh. K\';
postnr[1456] = \'Kbh. K\';
postnr[1457] = \'Kbh. K\';
postnr[1458] = \'Kbh. K\';
postnr[1459] = \'Kbh. K\';
postnr[1460] = \'Kbh. K\';
postnr[1461] = \'Kbh. K\';
postnr[1462] = \'Kbh. K\';
postnr[1463] = \'Kbh. K\';
postnr[1464] = \'Kbh. K\';
postnr[1465] = \'Kbh. K\';
postnr[1466] = \'Kbh. K\';
postnr[1467] = \'Kbh. K\';
postnr[1468] = \'Kbh. K\';
postnr[1470] = \'Kbh. K\';
postnr[1471] = \'Kbh. K\';
postnr[1472] = \'Kbh. K\';
postnr[1473] = \'Kbh. K\';
postnr[1550] = \'Kbh. V\';
postnr[1551] = \'Kbh. V\';
postnr[1552] = \'Kbh. V\';
postnr[1553] = \'Kbh. V\';
postnr[1554] = \'Kbh. V\';
postnr[1555] = \'Kbh. V\';
postnr[1556] = \'Kbh. V\';
postnr[1557] = \'Kbh. V\';
postnr[1558] = \'Kbh. V\';
postnr[1559] = \'Kbh. V\';
postnr[1560] = \'Kbh. V\';
postnr[1561] = \'Kbh. V\';
postnr[1562] = \'Kbh. V\';
postnr[1563] = \'Kbh. V\';
postnr[1564] = \'Kbh. V\';
postnr[1567] = \'Kbh. V\';
postnr[1568] = \'Kbh. V\';
postnr[1569] = \'Kbh. V\';
postnr[1570] = \'Kbh. V\';
postnr[1571] = \'Kbh. V\';
postnr[1572] = \'Kbh. V\';
postnr[1573] = \'Kbh. V\';
postnr[1574] = \'Kbh. V\';
postnr[1575] = \'Kbh. V\';
postnr[1576] = \'Kbh. V\';
postnr[1577] = \'Kbh. V\';
postnr[1600] = \'Kbh. V\';
postnr[1601] = \'Kbh. V\';
postnr[1602] = \'Kbh. V\';
postnr[1603] = \'Kbh. V\';
postnr[1604] = \'Kbh. V\';
postnr[1605] = \'Kbh. V\';
postnr[1606] = \'Kbh. V\';
postnr[1607] = \'Kbh. V\';
postnr[1608] = \'Kbh. V\';
postnr[1609] = \'Kbh. V\';
postnr[1610] = \'Kbh. V\';
postnr[1611] = \'Kbh. V\';
postnr[1612] = \'Kbh. V\';
postnr[1613] = \'Kbh. V\';
postnr[1614] = \'Kbh. V\';
postnr[1615] = \'Kbh. V\';
postnr[1616] = \'Kbh. V\';
postnr[1617] = \'Kbh. V\';
postnr[1618] = \'Kbh. V\';
postnr[1619] = \'Kbh. V\';
postnr[1620] = \'Kbh. V\';
postnr[1621] = \'Kbh. V\';
postnr[1622] = \'Kbh. V\';
postnr[1623] = \'Kbh. V\';
postnr[1624] = \'Kbh. V\';
postnr[1631] = \'Kbh. K\';
postnr[1632] = \'Kbh. V\';
postnr[1633] = \'Kbh. V\';
postnr[1634] = \'Kbh. V\';
postnr[1635] = \'Kbh. V\';
postnr[1650] = \'Kbh. V\';
postnr[1651] = \'Kbh. V\';
postnr[1652] = \'Kbh. V\';
postnr[1653] = \'Kbh. V\';
postnr[1654] = \'Kbh. V\';
postnr[1656] = \'Kbh. V\';
postnr[1657] = \'Kbh. V\';
postnr[1658] = \'Kbh. V\';
postnr[1659] = \'Kbh. V\';
postnr[1660] = \'Kbh. V\';
postnr[1661] = \'Kbh. V\';
postnr[1662] = \'Kbh. V\';
postnr[1663] = \'Kbh. V\';
postnr[1664] = \'Kbh. V\';
postnr[1665] = \'Kbh. V\';
postnr[1666] = \'Kbh. V\';
postnr[1667] = \'Kbh. V\';
postnr[1668] = \'Kbh. V\';
postnr[1669] = \'Kbh. V\';
postnr[1670] = \'Kbh. V\';
postnr[1671] = \'Kbh. V\';
postnr[1672] = \'Kbh. V\';
postnr[1673] = \'Kbh. V\';
postnr[1674] = \'Kbh. V\';
postnr[1675] = \'Kbh. V\';
postnr[1676] = \'Kbh. V\';
postnr[1677] = \'Kbh. V\';
postnr[1699] = \'Kbh. V\';
postnr[1700] = \'Kbh. V\';
postnr[1701] = \'Kbh. V\';
postnr[1702] = \'Kbh. V\';
postnr[1703] = \'Kbh. V\';
postnr[1704] = \'Kbh. V\';
postnr[1705] = \'Kbh. V\';
postnr[1706] = \'Kbh. V\';
postnr[1707] = \'Kbh. V\';
postnr[1708] = \'Kbh. V\';
postnr[1709] = \'Kbh. V\';
postnr[1710] = \'Kbh. V\';
postnr[1711] = \'Kbh. V\';
postnr[1712] = \'Kbh. V\';
postnr[1713] = \'Kbh. V\';
postnr[1714] = \'Kbh. V\';
postnr[1715] = \'Kbh. V\';
postnr[1716] = \'Kbh. V\';
postnr[1717] = \'Kbh. V\';
postnr[1718] = \'Kbh. V\';
postnr[1719] = \'Kbh. V\';
postnr[1720] = \'Kbh. V\';
postnr[1721] = \'Kbh. V\';
postnr[1722] = \'Kbh. V\';
postnr[1723] = \'Kbh. V\';
postnr[1724] = \'Kbh. V\';
postnr[1725] = \'Kbh. V\';
postnr[1726] = \'Kbh. V\';
postnr[1727] = \'Kbh. V\';
postnr[1728] = \'Kbh. V\';
postnr[1729] = \'Kbh. V\';
postnr[1730] = \'Kbh. V\';
postnr[1731] = \'Kbh. V\';
postnr[1732] = \'Kbh. V\';
postnr[1733] = \'Kbh. V\';
postnr[1734] = \'Kbh. V\';
postnr[1735] = \'Kbh. V\';
postnr[1736] = \'Kbh. V\';
postnr[1737] = \'Kbh. V\';
postnr[1738] = \'Kbh. V\';
postnr[1739] = \'Kbh. V\';
postnr[1748] = \'Kbh. V\';
postnr[1749] = \'Kbh. V\';
postnr[1750] = \'Kbh. V\';
postnr[1751] = \'Kbh. V\';
postnr[1752] = \'Kbh. V\';
postnr[1753] = \'Kbh. V\';
postnr[1754] = \'Kbh. V\';
postnr[1755] = \'Kbh. V\';
postnr[1756] = \'Kbh. V\';
postnr[1757] = \'Kbh. V\';
postnr[1758] = \'Kbh. V\';
postnr[1759] = \'Kbh. V\';
postnr[1760] = \'Kbh. V\';
postnr[1761] = \'Kbh. V\';
postnr[1762] = \'Kbh. V\';
postnr[1763] = \'Kbh. V\';
postnr[1764] = \'Kbh. V\';
postnr[1765] = \'Kbh. V\';
postnr[1766] = \'Kbh. V\';
postnr[1770] = \'Kbh. V\';
postnr[1771] = \'Kbh. V\';
postnr[1772] = \'Kbh. V\';
postnr[1773] = \'Kbh. V\';
postnr[1774] = \'Kbh. V\';
postnr[1775] = \'Kbh. V\';
postnr[1776] = \'Kbh. V\';
postnr[1777] = \'Kbh. V\';
postnr[1778] = \'Kbh. V\';
postnr[1800] = \'Frb. C\';
postnr[1801] = \'Frb. C\';
postnr[1802] = \'Frb. C\';
postnr[1803] = \'Frb. C\';
postnr[1804] = \'Frb. C\';
postnr[1805] = \'Frb. C\';
postnr[1806] = \'Frb. C\';
postnr[1807] = \'Frb. C\';
postnr[1808] = \'Frb. C\';
postnr[1809] = \'Frb. C\';
postnr[1810] = \'Frb. C\';
postnr[1811] = \'Frb. C\';
postnr[1812] = \'Frb. C\';
postnr[1813] = \'Frb. C\';
postnr[1814] = \'Frb. C\';
postnr[1815] = \'Frb. C\';
postnr[1816] = \'Frb. C\';
postnr[1817] = \'Frb. C\';
postnr[1818] = \'Frb. C\';
postnr[1819] = \'Frb. C\';
postnr[1820] = \'Frb. C\';
postnr[1822] = \'Frb. C\';
postnr[1823] = \'Frb. C\';
postnr[1824] = \'Frb. C\';
postnr[1825] = \'Frb. C\';
postnr[1826] = \'Frb. C\';
postnr[1827] = \'Frb. C\';
postnr[1828] = \'Frb. C\';
postnr[1829] = \'Frb. C\';
postnr[1850] = \'Frb. C\';
postnr[1851] = \'Frb. C\';
postnr[1852] = \'Frb. C\';
postnr[1853] = \'Frb. C\';
postnr[1854] = \'Frb. C\';
postnr[1855] = \'Frb. C\';
postnr[1856] = \'Frb. C\';
postnr[1857] = \'Frb. C\';
postnr[1860] = \'Frb. C\';
postnr[1861] = \'Frb. C\';
postnr[1862] = \'Frb. C\';
postnr[1863] = \'Frb. C\';
postnr[1864] = \'Frb. C\';
postnr[1865] = \'Frb. C\';
postnr[1866] = \'Frb. C\';
postnr[1867] = \'Frb. C\';
postnr[1868] = \'Frb. C\';
postnr[1870] = \'Frb. C\';
postnr[1871] = \'Frb. C\';
postnr[1872] = \'Frb. C\';
postnr[1873] = \'Frb. C\';
postnr[1874] = \'Frb. C\';
postnr[1875] = \'Frb. C\';
postnr[1876] = \'Frb. C\';
postnr[1877] = \'Frb  C\';
postnr[1878] = \'Frb. C\';
postnr[1879] = \'Frb. C\';
postnr[1900] = \'Frb. C\';
postnr[1901] = \'Frb. C\';
postnr[1902] = \'Frb. C\';
postnr[1903] = \'Frb. C\';
postnr[1904] = \'Frb. C\';
postnr[1905] = \'Frb. C\';
postnr[1906] = \'Frb. C\';
postnr[1908] = \'Frb. C\';
postnr[1909] = \'Frb. C\';
postnr[1910] = \'Frb. C\';
postnr[1911] = \'Frb. C\';
postnr[1912] = \'Frb. C\';
postnr[1913] = \'Frb. C\';
postnr[1914] = \'Frb. C\';
postnr[1915] = \'Frb. C\';
postnr[1916] = \'Frb. C\';
postnr[1917] = \'Frb. C\';
postnr[1918] = \'Frb. C\';
postnr[1920] = \'Frb. C\';
postnr[1921] = \'Frb. C\';
postnr[1922] = \'Frb. C\';
postnr[1923] = \'Frb. C\';
postnr[1924] = \'Frb. C\';
postnr[1925] = \'Frb. C\';
postnr[1926] = \'Frb. C\';
postnr[1927] = \'Frb. C\';
postnr[1928] = \'Frb. C\';
postnr[1950] = \'Frb. C\';
postnr[1951] = \'Frb. C\';
postnr[1952] = \'Frb. C\';
postnr[1953] = \'Frb. C\';
postnr[1954] = \'Frb. C\';
postnr[1955] = \'Frb. C\';
postnr[1956] = \'Frb. C\';
postnr[1957] = \'Frb. C\';
postnr[1958] = \'Frb. C\';
postnr[1959] = \'Frb. C\';
postnr[1960] = \'Frb. C\';
postnr[1961] = \'Frb. C\';
postnr[1962] = \'Frb. C\';
postnr[1963] = \'Frb. C\';
postnr[1964] = \'Frb. C\';
postnr[1965] = \'Frb. C\';
postnr[1966] = \'Frb. C\';
postnr[1967] = \'Frb. C\';
postnr[1970] = \'Frb. C\';
postnr[1971] = \'Frb. C\';
postnr[1972] = \'Frb. C\';
postnr[1973] = \'Frb. C\';
postnr[1974] = \'Frb. C\';
postnr[2000] = \'Frederiksberg\';
postnr[2100] = \'København Ø\';
postnr[2200] = \'København N\';
postnr[2300] = \'København S\';
postnr[2400] = \'København NV\';
postnr[2450] = \'København SV\';
postnr[2500] = \'Valby\';
postnr[2600] = \'Glostrup\';
postnr[2605] = \'Brøndby\';
postnr[2610] = \'Rødovre\';
postnr[2620] = \'Aalbertslund\';
postnr[2625] = \'Vallensbæk\';
postnr[2630] = \'Taastrup\';
postnr[2635] = \'Ishøj\';
postnr[2640] = \'Hedehusene\';
postnr[2650] = \'Hvidovre\';
postnr[2660] = \'Brøndby Strand\';
postnr[2665] = \'Vallensbæk Strand\';
postnr[2670] = \'Greve\';
postnr[2680] = \'Solrød Strand\';
postnr[2690] = \'Karlslunde\';
postnr[2700] = \'Brønshøj\';
postnr[2720] = \'Vanløse\';
postnr[2730] = \'Herlev\';
postnr[2740] = \'Skovlunde\';
postnr[2750] = \'Ballerup\';
postnr[2760] = \'Måløv\';
postnr[2765] = \'Smørum\';
postnr[2770] = \'Kastrup\';
postnr[2791] = \'Dragør\';
postnr[2800] = \'Lyngby\';
postnr[2820] = \'Gentofte\';
postnr[2830] = \'Virum\';
postnr[2840] = \'Holte\';
postnr[2850] = \'Nærum\';
postnr[2860] = \'Søborg\';
postnr[2880] = \'Bagsværd\';
postnr[2900] = \'Hellerup\';
postnr[2920] = \'Charlottenlund\';
postnr[2930] = \'Klampenborg\';
postnr[2942] = \'Skodsborg\';
postnr[2950] = \'Vedbæk\';
postnr[2960] = \'Rungsted Kyst\';
postnr[2970] = \'Hørsholm\';
postnr[2980] = \'Kokkedal\';
postnr[2990] = \'Nivå\';
postnr[3000] = \'Helsingør\';
postnr[3050] = \'Humlebæk\';
postnr[3060] = \'Espergærde\';
postnr[3070] = \'Snekkersten\';
postnr[3080] = \'Tikøb\';
postnr[3100] = \'Hornbæk\';
postnr[3120] = \'Dronningmølle\';
postnr[3140] = \'Ålsgårde\';
postnr[3150] = \'Hellebæk\';
postnr[3200] = \'Helsinge\';
postnr[3210] = \'Vejby\';
postnr[3220] = \'Tisvildeleje\';
postnr[3230] = \'Græsted\';
postnr[3250] = \'Gilleleje\';%0
Avatar billede netsrac Praktikant
05. juni 2001 - 15:23 #2
Hvad satan den åd halvdelen af mit script, nå men det er database genreret, så får du det lige i asp:

<HTML>
<HEAD>
<TITLE>:-)</TITLE>
<STYLE>
body { font-family: Tahoma; font-size: 13px; }
TD { font-family: Tahoma; font-size: 13px; }
input { width: 200px; }
textarea { width: 200px; }
input.knap { width: 100px; }
</STYLE>
<SCRIPT LANGUAGE=\"Javascript\">
function kundenr()
{
document.opretkunde.kundenummer.value = document.opretkunde.telefon.value;
}
postnr = new Array();
<%set rs = conn.execute(\"select * from postnr\")
do until rs.eof
response.write(\"postnr[\" & rs(\"postnr\") & \"] = \'\" & rs(\"city\") & \"\';\" & vbcrlf)
rs.movenext
loop
set rs = nothing
conn.close
set conn = nothing%>
function post()
{
if (eval(document.opretkunde.postnr.value) >= 1050 && eval(document.opretkunde.postnr.value) <= 9990)
document.opretkunde.city.value = postnr[eval(document.opretkunde.postnr.value)];
if (document.opretkunde.city.value == \'undefined\')
document.opretkunde.city.value = \'\';
}
</SCRIPT>
</HEAD>
<BODY ALINK=\"000000\" VLINK=\"000000\" LINK=\"000000\">
<!-- #include file=\"menu.txt\" --><BR><BR>
<B>Opret Kunde</B><BR><BR>
<FORM ACTION=\"opretkunde.asp?action=save\" METHOD=\"post\" NAME=\"opretkunde\">
<TABLE BORDER=\"0\">
<TR><TD>Kundenummer</TD><TD><INPUT TYPE=\"text\" NAME=\"kundenummer\"></TD></TR>
<TR><TD>Navn</TD><TD><INPUT TYPE=\"text\" NAME=\"navn\"></TD></TR>
<TR><TD VALIGN=\"top\">Adresse</TD><TD><TEXTAREA ROWS=\"3\" NAME=\"adresse\" cols=\"20\"></TEXTAREA></TD></TR>
<TR><TD>Postnr</TD><TD><INPUT TYPE=\"text\" NAME=\"postnr\" ONKEYUP=\"post();\" ONCHANGE=\"post();\"></TD></TR>
<TR><TD>By</TD><TD><INPUT TYPE=\"text\" NAME=\"city\" READONLY></TD></TR>
<TR><TD>Telefon</TD><TD><INPUT TYPE=\"text\" NAME=\"telefon\" ONKEYUP=\"kundenr();\" ONCHANGE=\"kundenr();\" MAXLENGTH=\"8\"></TD></TR>
<TR><TD>Telefax</TD><TD><INPUT TYPE=\"text\" NAME=\"telefax\"></TD></TR>
<TR><TD>Hjemmeside</TD><TD><INPUT TYPE=\"text\" NAME=\"hjemmeside\" VALUE=\"http://\"></TD></TR>
<TR><TD>Email</TD><TD><INPUT TYPE=\"email\" NAME=\"email\"></TD></TR>
<TR><TD>&nbsp;</TD><TD ALIGN=\"right\"><INPUT TYPE=\"submit\" VALUE=\"Gem\" CLASS=\"knap\"></TD></TR>
</TABLE>
</FORM>
</BODY>
</HTML>
Avatar billede syscom Nybegynder
05. juni 2001 - 15:26 #3
ok - det er fino :) takker for det hurtige svar!
Avatar billede netsrac Praktikant
05. juni 2001 - 15:27 #4
Så lidt :-)
Avatar billede Tony Breindal Juniormester
05. juni 2001 - 15:43 #5
>> netsrac

Er det muligt at få en kopi af den fil du prøvede at paste med alle postnummerne i DK (altså den uden ASP)? ... og har du den incl. Grønland og Færøerne ?

mailto:tbst@mail1.stofanet.dk

/Tony
Avatar billede netsrac Praktikant
05. juni 2001 - 15:46 #6
tony >> Sendt, nej jeg har den ikke over Grønland og Færøerne.
Avatar billede Tony Breindal Juniormester
05. juni 2001 - 15:53 #7
OK - tusinde tak ... er nået vel frem :-)

/Tony
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester