php - Merge different values from a jquery modal form and present this values in a drop down list -


i quite new web design programming. using jqueryui modal form create form allows user set meeting entering names , other details visitor. if user wants add more visitors, there button on form opens smaller jquery modal form add new visitor's first name , surname(for same meeting).

what want know how can merge first name , surname created on both forms form drop down list user can view first name , surname of visitors attending meeting.

(i don't want load values database, want reflect right away before saving database).

here sample.

    $( "#dialog-form" ).dialog({   autoopen: false,   modal: true,   buttons: {     "create meeting": function() {       var bvalid = true;       allfields.removeclass( "ui-state-error" ); if ( bvalid ) {         $( "#users tbody" ).append( "<tr>" +           "<td>" + meetname.val() + "</td>" +      "<td>" + "<select>" + "<option>"+ firstname.val() + "&nbsp;" + surname.val()+  "</option>" + "</select>" + "</td>" + "</tr>");        }     }, "add more visitors": function() {         $( "#another-dialog-modal" ).dialog('open');     },  $("#dialogselect").change(function(){ $( "#another-dialog-modal" ).dialog('open');}); $( "#another-dialog-modal" ).dialog({ autoopen: false, modal: true, buttons: {     cancel: function() {         $(this).dialog('close');     }, "add visitor": function() { var bvalid = true;       notallfields.removeclass( "ui-state-error" );  if ( bvalid ) {         $( "#users tbody" ).append( "<select>" + "<option>"+ fn.val() + "&nbsp;" + sn.val() + "</option>" + "</select>" );         $( ).dialog( "close" );       }     } 

what want how combine values first select tag , second select tag. can displayed on html page 1 drop down list.

i hope question clear?


Comments