yes, this is what i need
on the previous message the php code don’t appears!
* editoptions:{value:php function_getPadres();}
thanks
I’m trying to reload the values from a select menu that I get initially from a function in php:
colModel:[
…
{name:’idmenu’,index:’idmenu’,width:100, editable:true, edittype:”select”,editoptions:{value:””}},
…
]
If I insert a new menu it doesnt appear on the list because I havent reload the values.
How can i reload the values from idmenu using .setGridParam ?
ok, but for this I have to set all the colmodel again with setGridParam?
jQuery(“#navgrid”).setGridParam({
colModel:[….]
});
thanks for the help!
It works!
After delRowData(id) i call this function:
function deleteRow(row_id)
{
alert(row_id);
$.ajax({
url:”actions.php”,
type: ‘POST’,
dataType: ‘text’,
data:{oper:”del”, id:row_id},
complete:function (data, Status)
{
if (Status != “success”)
{
alert(‘cant delete’);
}
else {alert(‘deleted’);}
}
});
}
Hi again!
I’m trying to create a new element type to uploads files.
To upload a file I’m using the Ajax file upload plugin (ajaxfileupload.js), so what I need to know if I can call to that ajax function before I submit the form. I have tried this and didn’t work:
jQuery(“#navgrid”).jqGrid({
…
beforeSubmit : function(fileToUpload) {
function ajaxFileUpload()
{
…
$.ajaxFileUpload({
url:’doajaxfileupload.php’,
secureuri:false,
fileElementId:’fileToUpload’,
}
})
}
});
I think that the beforeSubmit is not on the correct place… cos I have put only an alert() and didn’t work. Which is the correct form to use this?
Maybe if I change the ajax function (about line 600) to submit the form on the file grid.formedit and use $.ajaxFileUpload would be a possible solution?
thanks!
Thanks, this works nice.
But there is one important problem with fckeditor. The way that we retrieve the data is different than on the others fields. I have to use this code:
var oEditor = FCKeditorAPI.GetInstance(‘fck_content’);
postdata[this.name] = oEditor.GetXHTML(true) || “
I have resolved the previous problem when we apply fckeditor to all textareas. In function createEl I have created fckeditor element and the I have to add a new class, fck:
case “fckeditor” :
elem = document.createElement(“textarea”);
$(elem).attr(options);
$(elem).html(vl);
$(elem).addClass(‘fck’);
break;
And on line 232 of grid.formedit:
$(“textarea.fck“).fck({path: ‘/fckeditor/’,toolbar: ‘Custom’, height: 400, width:600});
$(“#sData”, “#”+frmtb).click(function(e){
It works!
On the file grid.form-edit line 230 aprox. I added this line to load fckeditor and it works nice 🙂
if(rowid==”_empty”) $(“#pData,#nData”,”#”+frmtb).hide(); else $(“#pData,#nData”,”#”+frmtb).show();
$(‘textarea’).fck({path: ‘/fckeditor/’,toolbar: ‘Custom’, height: 400, width:600});
The only contra is that applies to all textarea fields. I will try to apply the id fckeditor to the element type…
thanks
Maybe with the Jquery Ajax Upload Plugin?
Whe can call the function on the form like this:
$.ajaxFileUpload({
url: ‘upload.php’,
fileElementId:’fileToUpload’,
dataType: ‘text’,
error: function(){alert(‘Error Data’);}
});
And then on the upload.php whe upload the file after submit the post:
$fileElementName = ‘fileToUpload’;
include(‘classes/class.upload.php’);
$handle = new Upload($_FILES[$fileElementName]);
$handle->image_resize = false;
$handle->Process(‘../images/’);
$msg = $_FILES;
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top