decker82

Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Author
    Replies
  • in reply to: Reload Edit Form #82444
    decker82
    Participant

    yes, this is what i need

    in reply to: Reload Edit Form #82395
    decker82
    Participant

    on the previous message the php code don’t appears!
    * editoptions:{value:php function_getPadres();}

    thanks

    in reply to: Reload Edit Form #82394
    decker82
    Participant

    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 ?

    in reply to: Reload Edit Form #82387
    decker82
    Participant

    ok, but for this I have to set all the colmodel again with setGridParam?

    jQuery(“#navgrid”).setGridParam({
    colModel:[….]
    });

    thanks for the help!

    in reply to: delete subgrid row #82372
    decker82
    Participant

    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’);}
    }
    });
    }

    in reply to: Upload file #82370
    decker82
    Participant

    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!

    in reply to: FCKeditor #82366
    decker82
    Participant

    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) || “

    in reply to: FCKeditor #82362
    decker82
    Participant

    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){

    in reply to: FCKeditor #82361
    decker82
    Participant

    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

    in reply to: Upload file #82359
    decker82
    Participant

    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;

Viewing 10 replies - 1 through 10 (of 10 total)

Stay connected with us in your favorite flavor!