1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> |
---|
2 | <html> |
---|
3 | <head> |
---|
4 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
---|
5 | <link href="css/main.css" rel="stylesheet" media="screen" /> |
---|
6 | <script type="text/javascript"> |
---|
7 | function loadData() { |
---|
8 | if (verifyAddressPinOK()) { |
---|
9 | var addrInfo = parent.document.getElementsByTagName("applet")[0].getPteidAddr(); |
---|
10 | document.getElementById("distrito").value = addrInfo.district; |
---|
11 | document.getElementById("concelho").value = addrInfo.municipality; |
---|
12 | document.getElementById("freguesia").value = addrInfo.civilParish; |
---|
13 | document.getElementById("abrTipoVia").value = addrInfo.streetTypeAbbr; |
---|
14 | document.getElementById("tipoVia").value = addrInfo.streetType; |
---|
15 | document.getElementById("designacaoVia").value = addrInfo.street; |
---|
16 | document.getElementById("abrTipoEdificio").value = addrInfo.buildingAbbr; |
---|
17 | document.getElementById("tipoEdificio").value = addrInfo.building; |
---|
18 | document.getElementById("numPorta").value = addrInfo.door; |
---|
19 | document.getElementById("andar").value = addrInfo.floor; |
---|
20 | document.getElementById("lado").value = addrInfo.side; |
---|
21 | document.getElementById("lugar").value = addrInfo.place; |
---|
22 | document.getElementById("localidade").value = addrInfo.locality; |
---|
23 | document.getElementById("cp4").value = addrInfo.cp4; |
---|
24 | document.getElementById("cp3").value = addrInfo.cp3; |
---|
25 | document.getElementById("localidadePostal").value = addrInfo.postal; |
---|
26 | } |
---|
27 | return false; |
---|
28 | } |
---|
29 | |
---|
30 | function verifyAddressPinOK() { |
---|
31 | var pin = prompt("Introduza o PIN da Morada"); |
---|
32 | if (pin != null) { |
---|
33 | var attemptsLeft = parent.document.getElementsByTagName("applet")[0].verifyAddressPin(pin); |
---|
34 | if (attemptsLeft == -1) { |
---|
35 | return true; |
---|
36 | } |
---|
37 | else { |
---|
38 | alert ("Pin errado. Tentativas disponiveis : "+ attemptsLeft); |
---|
39 | return false; |
---|
40 | } |
---|
41 | } |
---|
42 | return false; |
---|
43 | } |
---|
44 | </script> |
---|
45 | </head> |
---|
46 | <body onload="return loadData();"> |
---|
47 | <div id="content"> |
---|
48 | <div id="center_content"> |
---|
49 | <form action="" method=""> |
---|
50 | <div class="floatLeft"> |
---|
51 | <label>Distrito Nacional / National District</label></br> |
---|
52 | <input type="text" name="" value="" readonly="true" id="distrito"/></br> |
---|
53 | </div> |
---|
54 | <div class="clear"></div> |
---|
55 | <div class="floatLeft"> |
---|
56 | <label>Concelho / Municipality</label></br> |
---|
57 | <input type="text" name="" value="" readonly="true" id="concelho"/></br> |
---|
58 | </div> |
---|
59 | <div class="clear"></div> |
---|
60 | <div class="floatLeft"> |
---|
61 | <label>Frequesia / Parish</label></br> |
---|
62 | <input type="text" name="" value="" readonly="true" id="freguesia"/></br> |
---|
63 | </div> |
---|
64 | <div class="clear"></div> |
---|
65 | <div class="floatLeft"> |
---|
66 | <label>Abr. Tipo de Via / Street Type Abbr.</label></br> |
---|
67 | <input type="text" name="" value="" readonly="true" id="abrTipoVia"/> |
---|
68 | </div> |
---|
69 | <div class="floatLeft"> |
---|
70 | <label>Tipo de Via / Street Type</label></br> |
---|
71 | <input type="text" name="" value="" readonly="true" id="tipoVia"/></br> |
---|
72 | </div> |
---|
73 | <div class="clear"></div> |
---|
74 | <div class="floatLeft"> |
---|
75 | <label>Designação da Via / Street Name</label></br> |
---|
76 | <input type="text" name="" value="" readonly="true" id="designacaoVia"/></br> |
---|
77 | </div> |
---|
78 | <div class="clear"></div> |
---|
79 | <div class="floatLeft"> |
---|
80 | <label>Abr. Tipo de Edificio / Building Type Abbr.</label></br> |
---|
81 | <input type="text" name="" value="" readonly="true" id="abrTipoEdificio"/> |
---|
82 | </div> |
---|
83 | <div class="floatLeft"> |
---|
84 | <label>Tipo de Edificio / Building Type</label></br> |
---|
85 | <input type="text" name="" value="" readonly="true" id="tipoEdificio"/></br> |
---|
86 | </div> |
---|
87 | <div class="clear"></div> |
---|
88 | <div class="floatLeft"> |
---|
89 | <label>Nº da Porta / Door No</label></br> |
---|
90 | <input type="text" name="" value="" readonly="true" id="numPorta"/> |
---|
91 | </div> |
---|
92 | <div class="floatLeft"> |
---|
93 | <label>Andar / Floor</label></br> |
---|
94 | <input type="text" name="" value="" readonly="true" id="andar"/> |
---|
95 | </div> |
---|
96 | <div class="floatLeft"> |
---|
97 | <label>Lado / Side</label></br> |
---|
98 | <input type="text" name="" value="" readonly="true" id="lado"/></br> |
---|
99 | </div> |
---|
100 | <div class="clear"></div> |
---|
101 | <div class="floatLeft"> |
---|
102 | <label>Lugar / Place</label></br> |
---|
103 | <input type="text" name="" value="" readonly="true" id="lugar"/> |
---|
104 | </div> |
---|
105 | <div class="floatLeft"> |
---|
106 | <label>Localidade / Locality</label></br> |
---|
107 | <input type="text" name="" value="" readonly="true" id="localidade"/></br> |
---|
108 | </div> |
---|
109 | <div class="clear"></div> |
---|
110 | <div class="floatLeft"> |
---|
111 | <label>CP4 / ZIP4</label></br> |
---|
112 | <input type="text" name="" value="" readonly="true" id="cp4"/> |
---|
113 | </div> |
---|
114 | <div class="floatLeft"> |
---|
115 | <label>CP3 / ZIP3</label></br> |
---|
116 | <input type="text" name="" value="" readonly="true" id="cp3"/> |
---|
117 | </div> |
---|
118 | <div class="floatLeft"> |
---|
119 | <label>Localidade Postal / Postal Locality</label></br> |
---|
120 | <input type="text" name="" value="" readonly="true" id="localidadePostal"/> |
---|
121 | </div> |
---|
122 | </form> |
---|
123 | </div> |
---|
124 | </div> |
---|
125 | </body> |
---|
126 | </html> |
---|