Strona startowa Ludzie pragnÄ… czasami siÄ™ rozstawać, żeby móc tÄ™sknić, czekać i cieszyć siÄ™ z powrotem.<input type="submit" name="Submit" value="Submit"> </form> </body> </html> RozdziaÅ‚ 4 – Operacje na...Wielko[ Szostakowicza przejawiaBa si we wszystkim, co komponowaB, nawet je[li miaBo to zewntrzn form zamówienia partyjnego Å»adnych kamieni w koszykuPamiÄ™tacie Liii i Charlesa, parÄ™, która poznaÅ‚a siÄ™ na przyjÄ™­ciu i obiecaÅ‚a sobie, że dobra komunikacja bÄ™dzie...making sure it is started form rc...Aby nadaæ nazwê domenie NIS, do której nale¿y twój host, i j¹ wyÅ“wietliæ, mo¿esz u¿yæ polecenia domainname...class genapps_db extends DB_Sql{var $Host = "localhost";var $Database = "mydb";var $User = "root";var $Password = "root";}// katalog...Opinio iuris może siÄ™ przejawiać w różny sposób:1...z porównywania ciÄ…gów...  Case wcisnÄ…Å‚ klawisz symstymu...drze Wielki, Attylo, zdobywco i zwyciÄ™zco, nie imaginuj! Nie spÄ™dzaj na biednego diabÅ‚a! To ty sam siÄ™ Å›miejesz we wÅ‚asne ucho! Ja siÄ™ nie potrzebujÄ™ za...
 

Ludzie pragną czasami się rozstawać, żeby móc tęsknić, czekać i cieszyć się z powrotem.

frames[1].runningTab(document.forms[0])\', ' +
147 '25);">';
148 var tableTop = '<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=5>' +
149 '<TR><TH><B>Index' +
150 '<TH><B>Produkt<TH><B>Kategoria' +
151 '<TH><B>PLU<TH><B>Cena jednostkowa' +
152 '<TH><B>Ilość<TH><B>Kwota' +
153 '<TH><B>Usuń' +
154 '</TR>';
155 var itemStr = '';
156 for (var i = 0; i < shoppingBag.things.length; i++) {
157 itemStr += '<TR>' +
158 '<TD ALIGN=CENTER>' + (i + 1) + '</TD>' +
159 '<TD>' + shoppingBag.things[i].name + '</TD>' +
160 '<TD>' + shoppingBag.things[i].category + '</TD>' +
161 '<TD>' + shoppingBag.things[i].plu + '</TD>' +
162 '<TD ALIGN=RIGHT>$' +
163 parent.frames[1].numberFormat(shoppingBag.things[i].price) +
164 '</TD>' +
165 '<TD ALIGN=CENTER>' +
166 parent.frames[1].genSelect(shoppingBag.things[i].price,
167 shoppingBag.things[i].itemQty, i) + '</TD>' +
168 '<TD ALIGN=CENTER><INPUT TYPE=TEXT SIZE=10 VALUE="' +
169 parent.frames[1].numberFormat(shoppingBag.things[i].price *
170 shoppingBag.things[i].itemQty) +
171 '" onFocus="this.blur();"></TD>' +
172 '<TD ALIGN=CENTER><INPUT TYPE=CHECKBOX></TD>' +
Przykład 8.4. manager.html (ciąg dalszy)
173 '</TR>';
174 }
175 var tableBottom = '<TR>' +
176 '<TD ALIGN=RIGHT COLSPAN=6>SubTotal:</TD>' +
177 '<TD ALIGN=CENTER><INPUT TYPE=TEXT SIZE=10 NAME="subtotal" ' +
178 'onFocus="this.blur();"></TD></TR>' +
179 '<TR>' + '<TD ALIGN=RIGHT COLSPAN=6> + 6% Tax:</TD>' +
180 '<TD ALIGN=CENTER><INPUT TYPE=TEXT SIZE=10 NAME="tax" ' +
181 'onFocus="this.blur();"></TD></TR><TR><TD ALIGN=RIGHT COLSPAN=6>' +
191 RozdziaÅ‚ 8 - Shopping Bag – wózek sklepowy stworzony w JavaScripcie
182 '2% Shipping:</TD><TD ALIGN=CENTER><INPUT TYPE=TEXT ' +
183 'SIZE=10 NAME="ship" onFocus="this.blur();"></TD></TR>' +
184 '<TR>' +
185 '<TD ALIGN=RIGHT COLSPAN=3><INPUT TYPE=BUTTON VALUE="Do kasy" ' +
186 'onClick="parent.frames[1].checkOut(this.form);"></TD>' +
187 '<TD ALIGN=RIGHT><INPUT TYPE=RESET VALUE="Wyzeruj ilości"></TD>' +
188 '<TD ALIGN=RIGHT><INPUT TYPE=BUTTON VALUE="Zmiana koszyka" ' +
189 'onClick="parent.frames[1].changeBag(this.form, true);"></TD>' +
190 '<TD ALIGN=RIGHT>Suma:</TD><TD ALIGN=CENTER>' +
191 '<INPUT TYPE=TEXT NAME="total" SIZE=10 onFocus="this.blur();">' +
192 '</TD></TR>';
193
194 var footer = '</TABLE></FORM></BODY></HTML>';
195 infoStr = header + intro + tableTop + itemStr + tableBottom + footer;
196 parent.frames[0].location.replace(
197 'javascript: parent.frames[1].infoStr');
198 }
199
200 function genSelect(priceAgr, qty, idx) {
201 var selStr = '<SELECT onChange="this.form.elements[' + (idx * 3 + 1) +
202 '].value = this.options[this.selectedIndex].value; ' +
203 'parent.frames[1].runningTab(this.form);">';
204 for (var i = 1; i <= 10; i++) {
205 selStr += '<OPTION VALUE="' + numberFormat(i * priceAgr) + '"' +
206 (i == qty ? ' SELECTED' : '') + '>' + i;
207 }
208 selStr += '</SELECT>';
209 return selStr;
210 }
211
212 function runningTab(formObj) {
213 var subTotal = 0;
214 for (var i = 0; i < shoppingBag.things.length; i++) {
215 subTotal += parseFloat(formObj.elements[(i * 3) + 1].value);
216 }
217 formObj.subtotal.value = numberFormat(subTotal);
218 formObj.tax.value = numberFormat(subTotal * shoppingBag.taxRate);
219 formObj.ship.value = numberFormat(subTotal * shoppingBag.shipRate);
220 formObj.total.value = numberFormat(subTotal +
221 round(subTotal * shoppingBag.taxRate) +
222 round(subTotal * shoppingBag.shipRate));
223 shoppingBag.subTotal = formObj.subtotal.value;
224 shoppingBag.taxTotal = formObj.tax.value;
225 shoppingBag.shipTotal = formObj.ship.value;
226 shoppingBag.bagTotal = formObj.total.value;
227 }
228
229 function numberFormat(amount) {
230 var rawNumStr = round(amount) + '';
231 rawNumStr = (rawNumStr.charAt(0) == '.' ? '0' + rawNumStr : rawNumStr);
232 if (rawNumStr.charAt(rawNumStr.length - 3) == '.') {
233 return rawNumStr
234 }
235 else if (rawNumStr.charAt(rawNumStr.length - 2) == '.') {
236 return rawNumStr + '0';
237 }
Przykład 8.4. manager.html (ciąg dalszy)
238 else { return rawNumStr + '.00'; }
239 }
240 function round(number,decPlace) {
241 decPlace = (!decPlace ? 2 : decPlace);
242 return Math.round(number * Math.pow(10,decPlace)) /
243 Math.pow(10,decPlace);
244 }
245
246 function changeBag(formObj, showAgain) {
247 var tempBagArray = new Array();
248 for (var i = 0; i < shoppingBag.things.length; i++) {
249 if (!formObj.elements[(i * 3) + 2].checked) {
250 tempBagArray[tempBagArray.length] = shoppingBag.things[i];