CodeIgniter Forums

Full Version: [An Error Was Encountered] The URI you submitted has disallowed characters
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2

El Forum

[eluser]maria clara[/eluser]
hi to all,

i am creating a detail list in the jqgrid with the onSelectRow..but it shows me an error in my console like this:
Code:
<div id="content">
        <h1>An Error Was Encountered</h1>
        <p>The URI you submitted has disallowed characters.</p>    </div>

and here is the code in the CONTROLLER:
Code:
onSelectRow: function(ids) {
        if(ids == null) {
                ids=0;
                if(jQuery("#detFlex1").jqGrid('getGridParam','records') >0 )
                {
                    jQuery("#detFlex1").jqGrid('setGridParam',{url:"root + mod + '/detaillistview'"+ids,page:1});
                    jQuery("#detFlex1").jqGrid('setCaption',"System User Detail: "+ids)
                    .trigger('reloadGrid');
                }
        } else {
               jQuery("#detFlex1").jqGrid('setGridParam',{url:"root + mod + '/detaillistview'"+ids,page:1});
               jQuery("#detFlex1").jqGrid('setCaption',"System User Detail: "+ids)
               .trigger('reloadGrid');
               }
}
});
     jQuery("#listFlex").jqGrid(','#pager2',{edit:true,add:true,del:true,search:true,refresh:true },
        {}, // edit options
        {}, // add options
        {}, //del options
        {multipleSearch:true});
    
     jQuery("#listFlex").jqGrid('navButtonAdd','#pager2',{
                        caption: "Columns",
                        title: "Reorder Columns",
                        onClickButton : function (){
                            jQuery("#listFlex").jqGrid('setColumns');
                            }
    });
$("#listFlex").jqGrid(','#detFlexlist',{add:false,edit:false,del:false});
$('#detFlex1').jqGrid
(
    {
        url: root + mod + '/detaillistview',    
        editurl: root + mod + '/post2',        
        datatype: "json",
        mtype: 'POST',
        colNames : [ '','Company Code', 'Company Name', '','' ],
        colModel : [
             {name : 'checkbox', index: 'checkbox', width : 15, align : 'left', process:checkDetails}          
            ,{name : 'company_code', index: 'company_code', width : 80, align : 'left'}
            ,{name : 'company_name', index: 'company_name', width : 120, align : 'left'}
            ,{name : 'company_id', index: 'company_id', hidden:true}        
            ,{name : 'company_access_id', index: 'comapny_access_id',hidden:true}
            ],
        rowNum:10,
        rowList:[10,20,30],
        pager: '#detFlexlist',
        sortname: 'company_code',
        viewrecords: true,
        sortorder: "asc",
        autowidth: true,
        height: "200",
        caption:"System User Detail List "
}).navGrid('#pager10_d',{add:false,edit:false,del:false});

i think the url:"root + mod + '/detaillistview'" scripts are the responsible for the error...
hope anyone could help me...


thanks in advance,
maria :'(

El Forum

[eluser]WebsiteDuck[/eluser]
Code:
jQuery("#detFlex1").jqGrid('setGridParam',{url:"root + mod + '/detaillistview'"+ids,page:1});

I think maybe this should be

Code:
jQuery("#detFlex1").jqGrid('setGridParam',{url: root + mod + '/detaillistview'+ids,page:1});

Also looks like there might be other problems, but try fixing those url params and see what happens

El Forum

[eluser]maria clara[/eluser]
[quote author="bkaxrf" date="1262942164"]
Code:
jQuery("#detFlex1").jqGrid('setGridParam',{url:"root + mod + '/detaillistview'"+ids,page:1});

I think maybe this should be

Code:
jQuery("#detFlex1").jqGrid('setGridParam',{url: root + mod + '/detaillistview'+ids,page:1});

Also looks like there might be other problems, but try fixing those url params and see what happens[/quote]

i did what you have advised but it shows this error in my console:
Code:
<div id="content">
        <h1>404 Page Not Found</h1>
        <p>The page you requested was not found.</p>    
</div>

in the CONTROLLER:
Code:
onSelectRow: function(ids) {
                if(ids == null) {
                        ids=0;
                        if(jQuery("#detFlex1").jqGrid('getGridParam','records') >0 )
                            {
                                jQuery("#detFlex1").jqGrid('setGridParam',{url:root + mod + '/detaillistview'+ids,page:1});
                                jQuery("#detFlex1").jqGrid('setCaption',"System User Detail: "+ids)
                                .trigger('reloadGrid');
                            }
             } else {
                         jQuery("#detFlex1").jqGrid('setGridParam',{url:root + mod + '/detaillistview'+ids,page:1});
                         jQuery("#detFlex1").jqGrid('setCaption',"System User Detail: "+ids)
                        .trigger('reloadGrid');
                    }
        }



THANKS,
maria

El Forum

[eluser]jmadsen[/eluser]
This might be something new that has popped up in 1.7

read:
http://davidmichaelthompson.com/2009/09/...deigniter/

for a fix that works - I am interestin gin hearing more from more knowledgeable people on this "bug"? and the suggested fix.

El Forum

[eluser]maria clara[/eluser]
[quote author="jmadsen" date="1262943726"]This might be something new that has popped up in 1.7

read:
http://davidmichaelthompson.com/2009/09/...deigniter/

for a fix that works - I am interesting in hearing more from more knowledgeable people on this "bug"? and the suggested fix.[/quote]

hi,

thanks for the article..i will read this to learn more from this bug i encounter..
i will post here if i got this error right..


regards,
maria Wink

El Forum

[eluser]WebsiteDuck[/eluser]
The bug that jmadsen mentioned concerning dashes in the URI could be the problem if you're passing through dashes, but I'm not sure thats the problem.

Have you defined the root and mod variables in your javascript code?

Also I just noticed you don't have a forward slash at the end of your url
Code:
jQuery("#detFlex1").jqGrid('setGridParam',{url: root + mod + '/detaillistview/'+ids,page:1});

Try that also

El Forum

[eluser]maria clara[/eluser]
@bkaxrf,

it seems that the problem is in the scripts i made..because i do put the details in the CONTROLLER and it calls the script in the MODEL.

im trying now to combine the scripts i made to make it easier...

thanks,
maria

El Forum

[eluser]jmadsen[/eluser]
you may be right, but I think it goes beyond dashes. I just ran into it a day or two ago, but can't think what I was doing, other than it was a new CI setup that was otherwise pretty normal.

wish I weren't getting so darn old so I could remember :-(

El Forum

[eluser]WebsiteDuck[/eluser]
@jmadsen, You're right, it's not just dashes, so you might try the fix on that blog post if you're still getting the disallowed characters error

El Forum

[eluser]maria clara[/eluser]
[quote author="bkaxrf" date="1262945722"]@jmadsen, You're right, it's not just dashes, so you might try the fix on that blog post if you're still getting the disallowed characters error[/quote]

im not now getting the disallowed characters when i removed the "". but now i got a "page not found" error in my console..
Pages: 1 2