Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <td>Vendible?</td>
- <td><input type="checkbox" name="cboxvendibleEdit" id="var6" />
- </td>
- if (isset($_POST['xCodigo']))
- {
- $id = $_POST['xCodigo'];
- $v0 = $_POST['xDescripcion'];;
- $v1 = $_POST['xpreciocompra'];;
- $v2 = $_POST['xprecioventa'];;
- $v3 = $_POST['xcombocategoria'];;
- $v4 = $_POST['xcombomarca'];;
- $v5 = $_POST['xcomboseccion'];;
- $v6 = ($_POST['cboxvendibleEdit']) ? 1 : 0;
- $conexion->edit($id,$v0,$v1,$v2,$v3,$v4,$v5,$v6);
- //boton actualizar
- $('#actualizar').on('click', function(){
- var v0 = $('#var0').val();
- var v1 = $('#var1').val();
- var v2 = $('#var2').val();
- var v3 = $('#var3').val();
- var v4 = $('#var4').val();
- var v5 = $('#var5').val();
- var v6 = $('#var6').val();
- if (v0.length>0) { //valida requerido
- $('#xmensaje').html('<p></p>');
- var xparametros = $('#formUpdate').serialize();
- $.ajax({ //envia POST a otro php
- type: 'POST',
- url: 'item.iud.php',
- data: xparametros,
- success: function(data){
- var url = document.URL;
- location.href = url;
- }
- });
- }
- else {
- $('#xmensaje').html('<p class="alert alert-danger">Faltan algunos datos!</p>');
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement