Search code examples
jqueryjquery-uijquery-pluginschildwindow

Get child window select multiple values in jQuery


How can i open child window in jQuery and get selected values from generated <select multiple="multiple"> form element?

I can do it with window.open but as I am using jQuery I wonder if there are any plugins? Maybe handling this as a modal?


Solution

  • OK, I've found a solution to my problem !! If you also need to apply such feature to your web app just see it how I did it !! Maybe it'll help!!

    $("#winAC" ).dialog({
                    resizable: true,
                    height:400,
                    width: 50,
                    modal: true,
                    buttons: {
                        "Сохранить": function() {
                            $( this ).dialog( "close" );
                            var aAC=Array();
                            $("#sAC :selected").each(function(i,selected){
                            aAC.push($(selected).val());
    
    
                    });
                    alert(aAC);
    
                        },
                        "Отмена": function() {
                            //$("#ico"+rowID).html("");
                            $(this ).dialog( "close" );
    
    
                        }
                    }
                    });
    
                return false; 
            });