Actualización de cuadro de selección de Jquery Mobile IPhone en cascada con estilo personalizado que no se actualiza en el selector de interfaz de usuario de IPhone

I have a cascading state to city select box pair. The user chooses a state and an ajax routine updates the city select box with the state's cities from the database.

The select boxes have a custom styling.

User flow for IPhone:

  1. User presses state box
  2. Iphone native select box ui screen pops up from the bottom
  3. User chooses appropriate state
  4. The city box updates and refreshes but the native Iphone ui select box picker values do not update.

If the user presses the done button then presses the city select box it works fine.

I need the Iphone native ui to update it's values.

$('#select_destination_state').live('change',function(e)  {

  var stateVal = $(this).val();
  dstate = stateVal;
    $.ajax({
        url: '/inc/cityhandler.php?state='+ stateVal,

        success: function(data) {
          //alert(data);
          $('#select_destination_city').html(data);
          $('#select_destination_city option:first-child').attr("selected", "selected");
          $('#select_destination_city').selectmenu();
          $('#select_destination_city').selectmenu("refresh", true);

          select_to_miles(currSeg); //ajax function to get mileage

        }
      });
  });

preguntado el 28 de agosto de 12 a las 14:08

1 Respuestas

contestado el 23 de mayo de 17 a las 12:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.