jQuery Dialog but get dynamic inputs
All,
I'm trying to send an email with the jQuery dialog modal window. I can get the window to populate correctly and everything like that however I'm trying to populate some email addresses when I open the dialog window. Here is the jQuery to open the dialog window:

    $( "#dialog-form" ).dialog({
		autoOpen: false,
		height: 600,
		width: 750,
		modal: true,
		show: 'slide',
		buttons: {
			"Send Email": function() {
					var message_to_send = $( "#message_to_vendors" ).val();
					alert(message_to_send);
					var vendor_ids = $("#email_vendor_ids").val();
					alert(vendor_ids);
					$.post("send_vendor_emails.php", { email_vendor_ids: vendor_ids, message_to_vendors: message_to_send }, function(data) {
						alert("The data is: "+data);
						if(data=="yes"){
							$("#dialog-form").dialog( "close" );
						}
				   });
					
			},
			Cancel: function() {
				$( this ).dialog( "close" );
			}
		},
		close: function() {
			allFields.val( "" ).removeClass( "ui-state-error" );
		}
	});

Then here is my dialog form:
    
    <div id="dialog-form" title="Email Vendors">
    <form>
    <select data-placeholder="Vendors to Email" style="width:350px;" multiple class="chzn-select">
  	<div id="email_options">
	<option selected>Email Address 1</option>
	<option selected>Email Address 2</option>
	</div>
    </select>
    </form>
    </div>

I'm storing some email addresses in session variables and what I'd like to happen is when I click the dialog box to open it up that I can populate the email addresses in the Session variables. How can I do that with the dialog box?

Thanks for any help in advance!
jQuery Dialog but get dynamic inputs
===

All,
I'm trying to send an email with the jQuery dialog modal window. I can get the window to populate correctly and everything like that however I'm trying to populate some email addresses when I open the dialog window. Here is the jQuery to open the dialog window:

    $( "#dialog-form" ).dialog({
		autoOpen: false,
		height: 600,
		width: 750,
		modal: true,
		show: 'slide',
		buttons: {
			"Send Email": function() {
					var message_to_send = $( "#message_to_vendors" ).val();
					alert(message_to_send);
					var vendor_ids = $("#email_vendor_ids").val();
					alert(vendor_ids);
					$.post("send_vendor_emails.php", { email_vendor_ids: vendor_ids, message_to_vendors: message_to_send }, function(data) {
						alert("The data is: "+data);
						if(data=="yes"){
							$("#dialog-form").dialog( "close" );
						}
				   });
					
			},
			Cancel: function() {
				$( this ).dialog( "close" );
			}
		},
		close: function() {
			allFields.val( "" ).removeClass( "ui-state-error" );
		}
	});

Then here is my dialog form:
    
    <div id="dialog-form" title="Email Vendors">
    <form>
    <select data-placeholder="Vendors to Email" style="width:350px;" multiple class="chzn-select">
  	<div id="email_options">
	<option selected>Email Address 1</option>
	<option selected>Email Address 2</option>
	</div>
    </select>
    </form>
    </div>

I'm storing some email addresses in session variables and what I'd like to happen is when I click the dialog box to open it up that I can populate the email addresses in the Session variables. How can I do that with the dialog box?

Thanks for any help in advance!