post関数を実行していますが、関数が終了した後です。別の関数を実行しています。問題は、2番目の関数が機能しないことです。関数にアラートメッセージがない場合、機能しません...
jquery関数は次のとおりです。
function applyeditable(){
//alert('trying to apply editable class...');
$(".edit_mystatus").editable('/cgi-bin/my_cgi_script.pl', {
event : 'dblclick', //or dblclick
data : " {'A':'Active','C':'Completed','D':'Deleted'}",
type : 'select',
submit : 'Ok',
indicator : '<img src="http://my_website/images/indicator.gif">',
placeholder : 'Double Click to Edit',
tooltip : 'Double Click to edit...',
style : 'display: inline',
name : 'name',
id : 'id',
callback : function(value, settings) {
// console.log(this);
// console.log('returned value= '+value+' we have to now disable rest of form if Completed or Deleted');
// console.log(settings);
}
});
$(".edit_mynotes").editable('/cgi-bin/my_cgi_script.pl', {
event : 'dblclick', //or dblclick
type : 'textarea',
rows : 10,
cols : 100,
cancel : 'Cancel',
submit : 'Save',
indicator : '<img src="http://my_website/images/indicator.gif">',
placeholder : 'Double Click to enter text',
tooltip : 'Double Click to edit...',
style : 'display: inline',
name : 'name',
id : 'id'
});
$(".ajaxfileupload").editable('/cgi-bin/my_cgi_script.pl', {
type : 'ajaxupload',
submit : 'Upload',
cancel : 'Cancel',
indicator : '<img src="http://my_website/images/indicator.gif">',
tooltip : "Double Click to upload...",
style : 'display: inline',
name : 'filename',
id : 'id'
});
$(".checkclass").click(function() {
var $this = $(this);
// $this will contain a reference to the checkbox
var chkboxval = $this.val();
if ($this.is(':checked')) {
alert('the checkbox was checked val='+chkboxval);
} else {
alert('the checkbox was UNchecked val='+chkboxval);
}
});
}
htmlは:
<input type="checkbox" class="checkclass" value="1_0">
<input type="checkbox" class="checkclass" value="1_1">
<input type="checkbox" class="checkclass" value="1_2">
..。