ciccio
Posts: 0
Joined: Fri Jun 14, 2013 10:40 am

how to get values of checkox_items in a sliding panel

Hello,
i followed the suggestion proposed in the topic https://getsatisfaction.com/apperyio/... to have a sliding panel.
i added the asset from http://pastebin.com/F0z0PQAA
i added a Grid component on the page and leaft there an only cell. Grid is a container for the menu
and on Page Show event I Run JavaScript action with the following code:
code
if ( window.awesomeMenu == undefined) {
window.awesomeMenu = SlideMenu( Appery("mobilegrid_80"), Appery("mobilecontainer1") );
}
/code

then i added in the grid some button and a checkox group
to access to the functions for the buttons in the panel, on load event i run
code
$('[name="butt_close"]').on({
click: function() {
window.awesomeMenu.panel("close");
}
});
/code

but i dont know how to get the values of the checked items in the checkox group
i tried to add on page load event the code:

code
$('[name="checkbox_hotel"]').on({
onchange: function() {
alert('hotel Checked');
}
});
/code
but it doesn't work

then i tried

code
$('[name="checkboxgroup"]').find("input:checked").each(function(){
alert($(this).val());
});
/code
and this doesn't work

how can i solve my problem?

Oleg Danchenkov
Posts: 0
Joined: Tue Apr 30, 2013 5:51 pm

how to get values of checkox_items in a sliding panel

On page load event instead of
precode$('[name="checkbox_hotel"]').on({
onchange: function() {
alert('hotel Checked');
}
});/code/pre
try this code
precode$('[name="checkbox_hotel"]').off().on({
change: function() {
alert('hotel Checked/Unchecked');
}
});/code/pre
And instead of this (of course this code should be placed not on page load event)
precode$('[name="checkboxgroup"]').find("input:checked").each(function(){
alert($(this).val());
});/code/pre
try this
precode$('[dsid="checkboxgroup"]').find("input:checked").each(function(){
alert($(this).val());
});/code/pre

ciccio
Posts: 0
Joined: Fri Jun 14, 2013 10:40 am

how to get values of checkox_items in a sliding panel

thanks i solved using
code$('[name="button_searchl"]').on({
click: function() {
$(document).ready(function () {
var selectedValues="&quot
$checkedCheckboxes = $("input:checkbox[name=checkboxgroup]:checked")
$checkedCheckboxes.each(function () {
selectedValues += $(this).val() +",&quot
});
alert(selectedValues);
});
}
});
/code

Return to “Issues”