inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Apr 25, 2016 1:47:34 GMT -8
on click run the function? that does the disabled thing? Or onClick=function() something else?
Google searching provided me with this:
$("input[type=checkbox]").click(function() {
$(this).attr("disabled", true);
});
Which works, will it prevent the key from setting information?
Also is there any way that I can check the key for what checkboxes need to be checked on page load and retain them checked?
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Apr 25, 2016 9:17:49 GMT -8
on click run the function? that does the disabled thing? Or onClick=function() something else? Google searching provided me with this: $("input[type=checkbox]").click(function() {
$(this).attr("disabled", true);
}); Which works, will it prevent the key from setting information? Also is there any way that I can check the key for what checkboxes need to be checked on page load and retain them checked? That works but use .checkboxy cause input will screw up other forms. Under disabled put your key set You can load data with .get()
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Apr 25, 2016 9:20:59 GMT -8
Okay ^_^
What about console.logging for keys - like is there any way to output what is being saved into the console
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Apr 25, 2016 9:30:29 GMT -8
Okay ^_^ What about console.logging for keys - like is there any way to output what is being saved into the console Yeah after you save key console.log(value)
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Apr 25, 2016 9:57:38 GMT -8
okay so saving the key is setting the key? Or is there something else to do to make it save?
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Apr 25, 2016 10:07:25 GMT -8
okay so saving the key is setting the key? Or is there something else to do to make it save? Yes set and save is synonymous Nothing else required
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Apr 25, 2016 10:10:54 GMT -8
right so console log - do I need to use the key name or anything? I understand console.log (variable) but not in terms of how I'd do such for a key like what value? Do I put 'box1' or what?
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Apr 25, 2016 10:17:51 GMT -8
right so console log - do I need to use the key name or anything? I understand console.log (variable) but not in terms of how I'd do such for a key like what value? Do I put 'box1' or what? Console logging the value of the key is redundant. You set the key with a variable What's in the key is that variable. So logging the variable is the same as the key
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Apr 25, 2016 10:28:36 GMT -8
I'm confused
pb.plugin.key('ToDoListKey').set({ value:{'box1':1} /*This also saves the key!/* });
This is my key - which bit is the variable? Is value the variable?
Sorry I'm being dense I think but I just want to check
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Apr 25, 2016 11:35:01 GMT -8
I'm confused pb.plugin.key('ToDoListKey').set({ value:{'box1':1} /*This also saves the key!/* });
This is my key - which bit is the variable? Is value the variable? Sorry I'm being dense I think but I just want to check {'box1':1} Is actually the variable that I made up By no means should this be all you save in the key
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Apr 25, 2016 11:36:34 GMT -8
Okay xD
That makes sense, is there anyway to dynamically store the information as a checkbox gets ticked? Like literally telling the key 'save when something changes from false (unticked) to true (ticked) using the autoform already set up?
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Apr 25, 2016 11:45:18 GMT -8
Okay xD That makes sense, is there anyway to dynamically store the information as a checkbox gets ticked? Like literally telling the key 'save when something changes from false (unticked) to true (ticked) using the autoform already set up? Um where the onclick is with the disabled
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Apr 25, 2016 11:49:36 GMT -8
All right you lost me there
$(".checkboxy").click(function() { $(this).attr("disabled", true); }); pb.plugin.key('ToDoListKey').set({ value:{'box1':1} /*This also saves the key!*/ });
All right so
pb.plugin.key('ToDoListKey').set({ value:{'box1':1} /*This also saves the key!*/ });
Somehow merges with this one:
$(".checkboxy").click(function() { $(this).attr("disabled", true); /*would it go here and 'box1' be replaced with 'this' or? */ });
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Apr 25, 2016 12:00:52 GMT -8
new pic heh
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Apr 25, 2016 12:08:10 GMT -8
Yep new pic - am I anywhere near the mark?
|
|