Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
- <title>Calc</title>
- </head>
- <script>
- function getXMLHTTP() { //fuction to return the xml http object
- var xmlhttp=false;
- try{
- xmlhttp=new XMLHttpRequest();
- }
- catch(e) {
- try{
- xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
- }
- catch(e){
- try{
- xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
- }
- catch(e1){
- xmlhttp=false;
- }
- }
- }
- return xmlhttp;
- }
- function getProvincia(strURL) {
- var req = getXMLHTTP();
- if (req) {
- req.onreadystatechange = function() {
- if (req.readyState == 4) {
- // only if "OK"
- if (req.status == 200) {
- document.getElementById('provinciadiv').innerHTML=req.responseText;
- } else {
- alert("There was a problem while using XMLHTTP:\n" + req.statusText);
- }
- }
- }
- req.open("GET", strURL, true);
- req.send(null);
- }
- }
- </script>
- </head>
- <body onload='hideTotal()'>
- <div id="wrap">
- <form method="post" action="" name="form1">
- <div>
- <div class="cont_order">
- <fieldset>
- <label >Cantidad</label>
- <tr>
- <td width="150"><div><select name="cantidad" onChange="getProvincia('findcity.php?cantidad='+this.value)">
- <option value="">Selecciona cantidad</option>
- <option value="1.000">1 Pallet</option>
- <option value="2.000">2 Pallets</option>
- </select></div></td>
- </tr>
- <tr>
- <label>Provincia</label>
- <td ><div id="provinciadiv"><select id="provincia" name="provincia">
- <option>Selecciona provincia</option>
- </select></div></td>
- </tr>
- <tr>
- <td> </td>
- <td> </td>
- </tr>
- <tr>
- <td> </td>
- <td> </td>
- </tr>
- <div id="totalPrice"></div>
- </fieldset>
- </div>
- </form>
- </div></div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement