Multiselect_to gibt null zurück, auch wenn die Optionen ausgewählt sind

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Multiselect_to gibt null zurück, auch wenn die Optionen ausgewählt sind

by Guest » 14 Jan 2025, 11:52

Ich habe Multiselect implementiert und kann Optionen auf der linken Seite auswählen und auf die rechte Seite verschieben.
Wenn ich versuche, die ausgewählten Optionen im Javascript mithilfe von var abzurufen multiselect_toval=$('#multiselect_to').val();, es gibt null zurück, obwohl die Optionen ausgewählt sind. Wir freuen uns über jede Hilfe.
JSP-Code

Code: Select all





 Dashboard









function updateLabel() {
var aap_dropDownval=$("#aap_dropDown").val();
var flag_dropDown=$("#flag_dropDown").val();
var run_dropDown=$("#run_dropDown").val();
var optiondropDown=$("#optiondropDown").val();

var multiselect_toval=$('#multiselect_to').val();

alert("multi: "+multiselect_toval);

$.ajax({
url: "ReportGenerator",
type: "POST",
data:{aapnval:aap_dropDownval,flagval:flag_dropDown,runval:run_dropDown,optionval:optiondropDown,multiselectval:multiselect_toval},
success: function(data) {
// Update the label with the received data
$("#errorlbl").text(data);
}
});
}

function getOption() {
selectElement =
document.querySelector('#optiondropDown');
output = selectElement.value;
if(output=="Full List")
{
document.getElementById('multiselectdiv').style.visibility = 'visible';
}
else{

document.getElementById('multiselectdiv').style.visibility = 'hidden';
}
}

jQuery(document).ready(function($) {
$('#multiselect').multiselect();

});




[url=#]
[img]images/NovartisLogo.jpg[/img]
[/url]
NRV Flagging Status Dashboard





Application Name
App1
App2



Flag
M1
M2
M3



Run
Run1



Option
Summary
Full List







app_name
idname
business_name
current_flag
old_flag
run
path


>>
>

Top