I'm using a function like this to extract a few data from a form:
$(document).ready(function() {
$('#btnEnviar').click(function() {
var email = $('#email').val();
It's working, but now I also need to extract the content of a list box, which is a mark sign.
So I put the list box inside a span with id "idaevolta":
<ul class="ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all" role="listbox" aria-activedescendant="ui-active-menuitem" style="z-index: 1; top: 0px; left: 0px; display: none;"></ul>
<ul class="ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all" role="listbox" aria-activedescendant="ui-active-menuitem" style="z-index: 1; top: 0px; left: 0px; display: none;"></ul>
<input id="cbIdaVolta" type="hidden" name="cbIdaVolta" />
So far so good, but when I try to extract the data:
var idaevolta = $("#idaevolta").html();
It is simply not working.
UPDATE
WHILE LOOKING AT THE HTML OUPUT, WITH CHROME CONSOLE, LOOK WHAT I FOUND:
<input type="checkbox" id="cbIdaVolta" name="cbIdaVolta" style="width: 35px; height: 35px; margin-left: 10px;">
Does it make things easier to find a solution?
UDPATE 2
It is actually a check box.