php - Form not submitting Option Input value on POST -


got simple form made of text input , option select input. when submititing, firebug shows me on post no value option input has been sent, value text one. after checking other similar questions, don't find spelling mistake...

form:

<form id="turn_conf" method="post" action="config/forms/turn_conf/turn_insert.php">     <div class="smartformcontent">         <p class="inputform">             <label for="nombre">nombre:</label>             <input id="tu_name" class="" type="text" value="" name="tu_name">         </p>         <p class="inputform">             <label for="tipo">tipo turno:</label>             <select id="tu_type" class="" name="tu_type">                  <option value="1">maƱana</option>                  <option value="2">tarde</option>                  <option value="3">noche</option>             </select>         </p>         <input class="smartformsubmit" type="submit" value="crear" name="submit">     </div> </form> 

firebug shows posted data as:

only text input sent

fiy: post form sent jquery, here code:

function validadatos(e)  {     var turnname = $('input[name=tu_name]').val();     var turntype = $('input[name=tu_type]').val();      $.post($(this).attr('action'), { tu_name:turnname, tu_type:turntype }).success(feedback);     var emptyrow='<div class="tablerow newrow"><div class="contentcolumn60"><span class="tablecontenttext"></span></div><div class="contentcolumn20"><span class="tablecontenttext"></span></div><div class="contentcolumn10"><div class="tableiconlink"></div></div><div class="contentcolumn10"><div class="tableiconlink"></div></div></div>';     $(emptyrow).prependto('.tablecontent').hide().slidedown(500); messageinsert(); e.preventdefault();  }  function feedback (datos) {     var content= datos;     $('.newrow').html(datos); } 

var turntype = $('input[name=tu_type]').val() 

tu_type not input, select. work:

var turntype = $('select[name=tu_type]').val() 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -