Why Dropdown selected values not passing to the backend in jQuery
According to this drop down i want to set four conditions in the backend. when i select the dropdown items console will output the values as it is in the code i implemented.but when i debug the program, passed selected value to the backend is null.
$(document).ready(function() {
$("#secquneceDropdownId").change(function() {
var dropdownSelected = $(this).val();
console.log('dropdownSelected value is' + dropdownSelected);
$.post("/IdeaOfThings/listSequences", {
isDropdownSelected: dropdownSelected,
},
function(data, status) {});
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<label for="filter">Type:</label>
<select class="filter" id="secquneceDropdownId">
<option value="" selected>All</option>
<option value="INSEQUENCE">In Sequence</option>
<option value="OUTSEQUENCE">Out Sequence</option>
<option value="RECIPES">Sequence Mapping</option>
</select>
Why selected value printed in console but why it passing a null value to the backend.
jquery drop-down-menu parameter-passing
|
show 12 more comments
According to this drop down i want to set four conditions in the backend. when i select the dropdown items console will output the values as it is in the code i implemented.but when i debug the program, passed selected value to the backend is null.
$(document).ready(function() {
$("#secquneceDropdownId").change(function() {
var dropdownSelected = $(this).val();
console.log('dropdownSelected value is' + dropdownSelected);
$.post("/IdeaOfThings/listSequences", {
isDropdownSelected: dropdownSelected,
},
function(data, status) {});
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<label for="filter">Type:</label>
<select class="filter" id="secquneceDropdownId">
<option value="" selected>All</option>
<option value="INSEQUENCE">In Sequence</option>
<option value="OUTSEQUENCE">Out Sequence</option>
<option value="RECIPES">Sequence Mapping</option>
</select>
Why selected value printed in console but why it passing a null value to the backend.
jquery drop-down-menu parameter-passing
how are you checking int he backend can you share?
– guradio
Nov 12 at 5:51
@guradio i just debug the program and check it. is there any problem in above code snappiest? anything wrong in the passing value isDropdownSelected?
– L.Anush
Nov 12 at 5:55
do you have to pass anything afterisDropdownSelected: dropdownSelected,
? @L.Anush
– Kiranramchandran
Nov 12 at 6:05
@Kiranramchandran No i don`t have to pass anything after that.
– L.Anush
Nov 12 at 6:09
1
@L.Anush changesuccess:success
tosuccess:function(data){},
– Kiranramchandran
Nov 12 at 6:28
|
show 12 more comments
According to this drop down i want to set four conditions in the backend. when i select the dropdown items console will output the values as it is in the code i implemented.but when i debug the program, passed selected value to the backend is null.
$(document).ready(function() {
$("#secquneceDropdownId").change(function() {
var dropdownSelected = $(this).val();
console.log('dropdownSelected value is' + dropdownSelected);
$.post("/IdeaOfThings/listSequences", {
isDropdownSelected: dropdownSelected,
},
function(data, status) {});
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<label for="filter">Type:</label>
<select class="filter" id="secquneceDropdownId">
<option value="" selected>All</option>
<option value="INSEQUENCE">In Sequence</option>
<option value="OUTSEQUENCE">Out Sequence</option>
<option value="RECIPES">Sequence Mapping</option>
</select>
Why selected value printed in console but why it passing a null value to the backend.
jquery drop-down-menu parameter-passing
According to this drop down i want to set four conditions in the backend. when i select the dropdown items console will output the values as it is in the code i implemented.but when i debug the program, passed selected value to the backend is null.
$(document).ready(function() {
$("#secquneceDropdownId").change(function() {
var dropdownSelected = $(this).val();
console.log('dropdownSelected value is' + dropdownSelected);
$.post("/IdeaOfThings/listSequences", {
isDropdownSelected: dropdownSelected,
},
function(data, status) {});
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<label for="filter">Type:</label>
<select class="filter" id="secquneceDropdownId">
<option value="" selected>All</option>
<option value="INSEQUENCE">In Sequence</option>
<option value="OUTSEQUENCE">Out Sequence</option>
<option value="RECIPES">Sequence Mapping</option>
</select>
Why selected value printed in console but why it passing a null value to the backend.
$(document).ready(function() {
$("#secquneceDropdownId").change(function() {
var dropdownSelected = $(this).val();
console.log('dropdownSelected value is' + dropdownSelected);
$.post("/IdeaOfThings/listSequences", {
isDropdownSelected: dropdownSelected,
},
function(data, status) {});
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<label for="filter">Type:</label>
<select class="filter" id="secquneceDropdownId">
<option value="" selected>All</option>
<option value="INSEQUENCE">In Sequence</option>
<option value="OUTSEQUENCE">Out Sequence</option>
<option value="RECIPES">Sequence Mapping</option>
</select>
$(document).ready(function() {
$("#secquneceDropdownId").change(function() {
var dropdownSelected = $(this).val();
console.log('dropdownSelected value is' + dropdownSelected);
$.post("/IdeaOfThings/listSequences", {
isDropdownSelected: dropdownSelected,
},
function(data, status) {});
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<label for="filter">Type:</label>
<select class="filter" id="secquneceDropdownId">
<option value="" selected>All</option>
<option value="INSEQUENCE">In Sequence</option>
<option value="OUTSEQUENCE">Out Sequence</option>
<option value="RECIPES">Sequence Mapping</option>
</select>
jquery drop-down-menu parameter-passing
jquery drop-down-menu parameter-passing
edited Nov 12 at 5:52
guradio
13.7k31836
13.7k31836
asked Nov 12 at 5:48
L.Anush
347
347
how are you checking int he backend can you share?
– guradio
Nov 12 at 5:51
@guradio i just debug the program and check it. is there any problem in above code snappiest? anything wrong in the passing value isDropdownSelected?
– L.Anush
Nov 12 at 5:55
do you have to pass anything afterisDropdownSelected: dropdownSelected,
? @L.Anush
– Kiranramchandran
Nov 12 at 6:05
@Kiranramchandran No i don`t have to pass anything after that.
– L.Anush
Nov 12 at 6:09
1
@L.Anush changesuccess:success
tosuccess:function(data){},
– Kiranramchandran
Nov 12 at 6:28
|
show 12 more comments
how are you checking int he backend can you share?
– guradio
Nov 12 at 5:51
@guradio i just debug the program and check it. is there any problem in above code snappiest? anything wrong in the passing value isDropdownSelected?
– L.Anush
Nov 12 at 5:55
do you have to pass anything afterisDropdownSelected: dropdownSelected,
? @L.Anush
– Kiranramchandran
Nov 12 at 6:05
@Kiranramchandran No i don`t have to pass anything after that.
– L.Anush
Nov 12 at 6:09
1
@L.Anush changesuccess:success
tosuccess:function(data){},
– Kiranramchandran
Nov 12 at 6:28
how are you checking int he backend can you share?
– guradio
Nov 12 at 5:51
how are you checking int he backend can you share?
– guradio
Nov 12 at 5:51
@guradio i just debug the program and check it. is there any problem in above code snappiest? anything wrong in the passing value isDropdownSelected?
– L.Anush
Nov 12 at 5:55
@guradio i just debug the program and check it. is there any problem in above code snappiest? anything wrong in the passing value isDropdownSelected?
– L.Anush
Nov 12 at 5:55
do you have to pass anything after
isDropdownSelected: dropdownSelected,
? @L.Anush– Kiranramchandran
Nov 12 at 6:05
do you have to pass anything after
isDropdownSelected: dropdownSelected,
? @L.Anush– Kiranramchandran
Nov 12 at 6:05
@Kiranramchandran No i don`t have to pass anything after that.
– L.Anush
Nov 12 at 6:09
@Kiranramchandran No i don`t have to pass anything after that.
– L.Anush
Nov 12 at 6:09
1
1
@L.Anush change
success:success
to success:function(data){},
– Kiranramchandran
Nov 12 at 6:28
@L.Anush change
success:success
to success:function(data){},
– Kiranramchandran
Nov 12 at 6:28
|
show 12 more comments
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53256509%2fwhy-dropdown-selected-values-not-passing-to-the-backend-in-jquery%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53256509%2fwhy-dropdown-selected-values-not-passing-to-the-backend-in-jquery%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
how are you checking int he backend can you share?
– guradio
Nov 12 at 5:51
@guradio i just debug the program and check it. is there any problem in above code snappiest? anything wrong in the passing value isDropdownSelected?
– L.Anush
Nov 12 at 5:55
do you have to pass anything after
isDropdownSelected: dropdownSelected,
? @L.Anush– Kiranramchandran
Nov 12 at 6:05
@Kiranramchandran No i don`t have to pass anything after that.
– L.Anush
Nov 12 at 6:09
1
@L.Anush change
success:success
tosuccess:function(data){},
– Kiranramchandran
Nov 12 at 6:28