Welcome Guest, Not a member yet? Register   Sign In
jquery post
#11

[eluser]Thorpe Obazee[/eluser]
or just use the callback do whatever there?
#12

[eluser]marjune[/eluser]
i don't want the urls like this controller/viewthread/1 by using href function
#13

[eluser]Thorpe Obazee[/eluser]
It's really hard to get what you want. Perhaps something visual that you can show us?
#14

[eluser]kikz4life[/eluser]
hi to all,

since its about jquery topic,. i'll snip this codes and ask a question too. i have here my code where i have a table(user_access_level) with two fields: access_id & access_level
1 = all access
1 = add request
1 = edit
1 = delete
1 = approve

how it look like: access_id = 8 & access_level = 11111
in access_level = 11111 means that he/she have all access of the site like an admin if 01111 means he has he has no access, if 11011 means he has access and able to add request but prohibited from editing the request and so on....

this is my code access.js
Code:
function checkAccess(celDiv,id)
{
    var celValue = $(celDiv).html();
    
    if (celValue==1) $(celDiv).html("<input type='checkbox' value='"+$(celDiv).html()+"' checked disabled>")
    else $(celDiv).html("<input type='checkbox' value='"+$(celDiv).html()+"' disabled>")    

    
    $(celDiv).click
    (
         function()
        {
            $('input',this).each(
                 function(){

                    tr_idx = $('#detFlex1 tbody tr').index($(this).parent().parent().parent());    
                    td_idx = $('#detFlex1 tbody tr:eq('+tr_idx+') td').index($(this).parent().parent());
                    td_last = 13;
                    if ($(this).attr('checked') == true)
                    {
                        df[0].rows[tr_idx].cell[td_idx] = 1;
                        
                        if (td_idx==3)
                        {
                            for(var td=td_idx+1; td<=td_last;td++)
                            {
                                df[0].rows[tr_idx].cell[td] = 1;
                            }
                            
                            df[0].rows[tr_idx].cell[2] = 1;
                        }
                        
                        if (td_idx > 3)
                        {
                            df[0].rows[tr_idx].cell[2] = 1;
                        }
                        
                    }
                    else
                    {
                        df[0].rows[tr_idx].cell[td_idx] = 0;
                        
                        if (td_idx==2)
                        {
                            for(var td=td_idx+1; td<=td_last;td++)
                            {
                                df[0].rows[tr_idx].cell[td] = 0;
                            }
                        }
                        else if (td_idx==3)
                        {
                            for(var td=td_idx+1; td<=td_last;td++)
                            {
                                df[0].rows[tr_idx].cell[td] = 0;
                            }
                        }    
                        
                        if (td_idx > 3)
                        {
                            df[0].rows[tr_idx].cell[3] = 0;
                        }
                    }
                    
                    $('#detFlex1').flexAddData(df[0]);
                    $('.toolbar a[title=Edit Item]').trigger('click');
                 });    
        }
    );
}
used flexigrid
Code:
.....
            {display: '', name : '', width : 1, align : 'left'}
            ,{display: '&lt;?=lang("modules")?&gt;', name : 'module_name', width : 150, align : 'left'}
            ,{display: '&lt;?=lang("all_access")?&gt;', name : 'all_access', width : 50, align : 'center', process: checkAccess}
            ,{display: '&lt;?=lang("add")?&gt;', name : 'add', width : 50, align : 'center', process: checkAccess}
            ,{display: '&lt;?=lang("edit")?&gt;', name: 'editd', width : 50, align : 'center', process: checkAccess}
            ,{display: '&lt;?=lang("delete")?&gt;', name : 'delete' , width : 50, align : 'center', process: checkAccess}
            ,{display: '&lt;?=lang("approve")?&gt;', name : 'approve', width : 50, align : 'center', process: checkAccess}
            ,{display: '&lt;?=lang("cancel")?&gt;', name : 'm_cancel', width : 50, align : 'center', process: checkAccess}

.....

now my problem is when i click one checkbox button it took me 3-4 sec,... i know that the problem is in the checkaccess function because of the loop sections it takes. Could anyone help me with this, what i want is like for those in checkbox html tag. i click and your on the go...




Theme © iAndrew 2016 - Forum software by © MyBB