Ver Mensaje Individual
  #11 (permalink)  
Antiguo 21/06/2011, 08:46
Avatar de kimmy
kimmy
 
Fecha de Ingreso: julio-2008
Mensajes: 841
Antigüedad: 15 años, 9 meses
Puntos: 15
Respuesta: Enviar datos de un Jquery Tab a PHP

livemusic gracias por tu apoyo pero sigue sin servirme. asi lo tengo:

Código PHP:
Ver original
  1. <head>
  2. <script src="jquery.tools.min.js"></script>
  3. <link rel="stylesheet" type="text/css" href="standalone.css">  
  4. <link rel="stylesheet" type="text/css" href="tabs.css">
  5.  
  6. <script>
  7. function tab(pestana,wizard)
  8. {
  9.    pst = document.getElementById(pestana);
  10.    pnl = document.getElementById(wizard);
  11.    psts = document.getElementById('tabs').getElementsByTagName('li');
  12.    pnls = document.getElementById('wizard').getElementsByTagName('div');
  13.  
  14. }
  15. </script>
  16.  
  17. <script language="javascript">
  18. function fn_insert_user(){
  19.     var str = $("#insert_user").serialize();
  20.     $.ajax({
  21.         url: 'detalle_cotizacion.php',
  22.         data: str,
  23.         type: 'post',
  24.         success: function(data){
  25.             $("#show").html(data);
  26.         }
  27.     });
  28. };
  29.  
  30. </script>
  31. </head>
  32. <body>
  33.  
  34. <div id="content">
  35. <div id="promotions">
  36. <form action="javascript: fn_insert_user();" id="insert_user">
  37. <div id="wizard">
  38. <!-- tabs -->
  39.     <ul class="tabs">
  40.         <li><a href="#EventoTab" class="w2 current">Evento</a></li>
  41.         <li><a href="#AtraccTab" class="w2">Atracciones</a></li>
  42.         <li><a href="#AlimentoTab" class="w2">Alimentos/Bebidas</a></li>
  43.         <li><a href="#FestejosTab" class="w2">Festejos</a></li>
  44.         <li><a href="#EntretenTab" class="w2">Entretenimiento</a></li>
  45.         <li><a href="#DecorTab" class="w2">Decoración</a></li>
  46.     </ul>
  47.  
  48. <!-- panes -->
  49. <div class="panes">
  50. <div style="display: block;">
  51.   <table width='400'>
  52.   <p></p>  <p></p>
  53.    <tr>
  54.    <td>Fecha:</td>
  55.    <td><input name="fecha_evento" id="fecha_evento" type="text" ></td>
  56.    <td>Tipo:</td>
  57.    <td><input name="tipo_evento" type="text"></td>
  58.    </tr>
  59.    <tr>
  60.    <td>Dirección:</td>
  61.    <td><input name="dir_evento" type="text" id="dir_evento" ></td>
  62.    <td>Lugar:</td>
  63.    <td><input name="carac_lugar" type="text" ></td>
  64.    </tr>
  65.     <tr>
  66.    <td>Hora Inicio:</td>
  67.    <td><input name="hora_ini" type="text" id="hora_ini" ></td>
  68.    <td>Niños:</td>
  69.    <td><input name="ctdad_ninos" type="text" ></td>
  70.    </tr>
  71.     <tr>
  72.    <td>Adultos:</td>
  73.    <td><input name="ctdad_adult" type="text" id="ctdad_adult"></td>
  74.    <td>Generadora Energia:</td>
  75.    <td>
  76.    <label>
  77.    <input type="radio" name="energia" value="si" id="e_0" >si
  78.    <input type="radio" name="energia" value="no" id="e_1" >no
  79.    </label>
  80.    </td>
  81.    </tr>
  82.    </table>
  83.       <p><button class="next">Next »</button></p>
  84. </div>
  85.  
  86. <!-- P1 -->        
  87. <div style="display: block;">
  88. <table width="600">
  89.   <tr>
  90.     <td width="300">
  91.  
  92.  <table width="300">
  93.  <tr>
  94. <td colspan="2"><center>Atracciones</center></td>
  95. </tr>
  96. <?php echo "
  97.  <td width=\"150\">Producto</td>
  98.  <td width=\"100\">Seleccionar</td>  
  99.  </tr>
  100.  <tr>";
  101.     $rs = mysql_query("SELECT * FROM coti where categoria='atracc'");
  102.     while ($result = mysql_fetch_array($rs)) {
  103.     $categoria = $result['categoria'];
  104.     $producto = $result['producto'];
  105. echo
  106. "          
  107.   <td>$producto</td>
  108.   <td><input name=\"atracc\" type=\"checkbox\" value=\"\"></td>
  109.   </tr>"; }?>
  110.     </table>
  111.  
  112. <td width="300"><table width="300">
  113. <tr>
  114. <td colspan="2"><center>Promocionales</center></td>
  115. </tr>
  116. <?php echo
  117. "
  118.  <tr>
  119.  <td width=\"150\">Producto</td>
  120.  <td width=\"100\">Seleccionar</td>  
  121.  </tr>
  122.  <tr>";
  123.     $rs = mysql_query("SELECT * FROM coti where categoria='promo'");
  124.     while ($result = mysql_fetch_array($rs)) {
  125.     $categoria = $result['categoria'];
  126.     $producto = $result['producto'];
  127. echo
  128. "          
  129.   <td>$producto</td>
  130.   <td><input name=\"atracc\" type=\"checkbox\" value=\"\"></td>
  131.   </tr>
  132.  ";
  133. }
  134. ?>
  135.     </table></td></td>
  136.   </tr>
  137. </table>
  138.     <label>
  139.     <p><button class="prev">« Prev</button>
  140.     <button class="next">Next »</button></p>
  141.    </label>
  142. </div>
  143.  
  144. <!-- P2-->                
  145. <div style="display: block;">
  146. <table width="600">
  147.   <tr>
  148.     <td width="300">
  149.  
  150.  <table width="300">
  151.  <tr>
  152. <td colspan="2"><center>Alimentos</center></td>
  153. </tr>
  154. <?php echo "
  155.  <td width=\"150\">Producto</td>
  156.  <td width=\"100\">Seleccionar</td>  
  157.  </tr>
  158.  <tr>";
  159.     $rs = mysql_query("SELECT * FROM coti where categoria='alim'");
  160.     while ($result = mysql_fetch_array($rs)) {
  161.     $categoria = $result['categoria'];
  162.     $producto = $result['producto'];
  163. echo
  164. "          
  165.   <td>$producto</td>
  166.   <td><input name=\"atracc\" type=\"checkbox\" value=\"\"></td>
  167.   </tr>"; }?>
  168.     </table>
  169.  
  170. <td width="300"><table width="300">
  171. <tr>
  172. <td colspan="2"><center>Bebidas</center></td>
  173. </tr>
  174. <?php echo
  175. "
  176.  <tr>
  177.  <td width=\"150\">Producto</td>
  178.  <td width=\"100\">Seleccionar</td>  
  179.  </tr>
  180.  <tr>";
  181.     $rs = mysql_query("SELECT * FROM coti where categoria='beb'");
  182.     while ($result = mysql_fetch_array($rs)) {
  183.     $categoria = $result['categoria'];
  184.     $producto = $result['producto'];
  185. echo
  186. "          
  187.   <td>$producto</td>
  188.   <td><input name=\"atracc\" type=\"checkbox\" value=\"\"></td>
  189.   </tr>
  190.  ";
  191. }
  192. ?>
  193.     </table></td></td>
  194.   </tr>
  195. </table>
  196. <label>
  197.     <p><button class="prev">« Prev</button>
  198.     <button class="next">Next »</button></p>
  199.  
  200.    </label>
  201. </div>
  202.  
  203. <!-- P3 -->                
  204. <div style="display: block;">
  205. <table width="600">
  206.   <tr>
  207.     <td width="300">
  208.  
  209.  <table width="300">
  210.  <tr>
  211. <td colspan="2"><center>Festejos</center></td>
  212. </tr>
  213. <?php echo "
  214.  <td width=\"150\">Producto</td>
  215.  <td width=\"100\">Seleccionar</td>  
  216.  </tr>
  217.  <tr>";
  218.     $rs = mysql_query("SELECT * FROM coti where categoria='fest'");
  219.     while ($result = mysql_fetch_array($rs)) {
  220.     $categoria = $result['categoria'];
  221.     $producto = $result['producto'];
  222. echo
  223. "          
  224.   <td>$producto</td>
  225.   <td><input name=\"atracc\" type=\"checkbox\" value=\"\"></td>
  226.   </tr>"; }?>
  227.     </table>
  228.  
  229. <td width="300"><table width="300">
  230. <tr>
  231. <td colspan="2"><center>Festejos</center></td>
  232. </tr>
  233. <?php echo
  234. "
  235.  <tr>
  236.  <td width=\"150\">Producto</td>
  237.  <td width=\"100\">Seleccionar</td>  
  238.  </tr>
  239.  <tr>";
  240. echo
  241. "          
  242.   <td>$producto</td>
  243.   <td><input name=\"atracc\" type=\"checkbox\" value=\"\"></td>
  244.   </tr>
  245.  ";
  246. }
  247. ?>
  248.     </table></td></td>
  249.   </tr>
  250. </table>
  251. <label>
  252.     <p><button class="prev">« Prev</button>
  253.     <button class="next"  >Next »</button></p>
  254.  
  255.    </label>
  256. </div>
  257.  
  258. <!-- P4 -->                
  259. <div style="display: block;">
  260. <table width="600">
  261.   <tr>
  262.     <td width="300">
  263.   <table width="300">
  264.  <tr>
  265. <td colspan="2"><center>Entretenimiento</center></td>
  266. </tr>
  267. <?php echo "
  268.  <td width=\"150\">Producto</td>
  269.  <td width=\"100\">Seleccionar</td>  
  270.  </tr>
  271.  <tr>";
  272.     $rs = mysql_query("SELECT * FROM coti where categoria='entret'");
  273.     while ($result = mysql_fetch_array($rs)) {
  274.     $categoria = $result['categoria'];
  275.     $producto = $result['producto'];
  276. echo
  277. "          
  278.   <td>$producto</td>
  279.   <td><input name=\"atracc\" type=\"checkbox\" value=\"\"></td>
  280.   </tr>"; }?>
  281.     </table>
  282.  
  283. <td width="300"><table width="300">
  284. <tr>
  285. <td colspan="2"><center>Entretenimiento</center></td>
  286. </tr>
  287. <?php echo
  288. "
  289.  <tr>
  290.  <td width=\"150\">Producto</td>
  291.  <td width=\"100\">Seleccionar</td>  
  292.  </tr>
  293.  <tr>";
  294. echo
  295. "          
  296.   <td>$producto</td>
  297.   <td><input name=\"atracc\" type=\"checkbox\" value=\"\"></td>
  298.   </tr>
  299.  ";
  300. }
  301. ?>
  302.     </table></td></td>
  303.   </tr>
  304. </table>
  305. <label>
  306.     <p><button class="prev">« Prev</button>
  307.     <button class="next" >Next »</button></p>
  308.  
  309.    </label>
  310. </div>
  311.  
  312. <!-- P5 -->                
  313. <div style="display: block;">
  314. <table width="600">
  315.   <tr>
  316.     <td width="300">
  317.  
  318.  <table width="300">
  319.  <tr>
  320. <td colspan="2"><center>Decoración</center></td>
  321. </tr>
  322. <?php echo "
  323.  <td width=\"150\">Producto</td>
  324.  <td width=\"100\">Seleccionar</td>  
  325.  </tr>
  326.  <tr>";
  327.     $rs = mysql_query("SELECT * FROM coti where categoria='decor'");
  328.     while ($result = mysql_fetch_array($rs)) {
  329.     $categoria = $result['categoria'];
  330.     $producto = $result['producto'];
  331. echo
  332. "          
  333.   <td>$producto</td>
  334.   <td><input name=\"atracc\" type=\"checkbox\" value=\"\"></td>
  335.   </tr>"; }?>
  336.     </table>
  337.  
  338. <td width="300"><table width="300">
  339. <tr>
  340. <td colspan="2"><center>Decoración</center></td>
  341. </tr>
  342. <?php echo
  343. "
  344.  <tr>
  345.  <td width=\"150\">Producto</td>
  346.  <td width=\"100\">Seleccionar</td>  
  347.  </tr>
  348.  <tr>";
  349. echo
  350. "          
  351.   <td>$producto</td>
  352.   <td><input name=\"atracc\" type=\"checkbox\" value=\"\"></td>
  353.   </tr>
  354.  ";
  355. }
  356. ?>
  357.     </table></td></td>
  358.   </tr>
  359. </table>
  360. <label>
  361.     <p><button class="prev">« Prev</button>
  362. <input type="submit" value="Cotizar"/>
  363.    </label>
  364. </div>
  365. </div>
  366. </div>
  367. </form>
  368.  
  369. <script>
  370. $(function() {
  371.     // get container for the wizard and initialize its exposing
  372.     var wizard = $("#wizard");
  373.  
  374. // enable exposing on the wizard
  375.     wizard.click(function() {
  376.         $(this).load();
  377.     });
  378.    
  379.     // enable tabs that are contained within the wizard
  380.     $("ul.tabs", wizard).tabs("div.panes > div", function(event, index) {
  381.         /* now we are inside the onBeforeClick event */
  382.     });
  383.  
  384.     // get handle to the tabs API
  385.     var api = $("ul.tabs", wizard).data("tabs");
  386.  
  387.     // "next tab" button
  388.     $("button.next", wizard).click(function() {
  389.         api.next();
  390.     });
  391.  
  392.     // "previous tab" button
  393.     $("button.prev", wizard).click(function() {
  394.         api.prev();
  395.     });
  396.  
  397. });
  398. </script>
  399. </div>
  400. </div>
  401. </div>
  402. </body>
  403. </html>

Será que como lo tengo no funciona lo que me indicaste?
__________________
Caminando con el corazón partío