I've a strange problem using RegisterClientScriptBlock to update the content of a UpdatePanel.
Server side I build a script, that sometimes can be very big, and if i inject it with RegisterClientScriptBlock, it doesn't run with Firefox, Opera and Safari, while it runs perfectly with IE and Chrome.
I tried to "cut" the script, to limit the size, and by this way it runs with every browser, but obviously I need the entire script.
tommyold85
Member
58 Points
19 Posts
Problem with RegisterClientScriptBlock
Feb 15, 2012 08:38 AM|LINK
Hi
I've a strange problem using RegisterClientScriptBlock to update the content of a UpdatePanel.
Server side I build a script, that sometimes can be very big, and if i inject it with RegisterClientScriptBlock, it doesn't run with Firefox, Opera and Safari, while it runs perfectly with IE and Chrome.
I tried to "cut" the script, to limit the size, and by this way it runs with every browser, but obviously I need the entire script.
What can i do to solve this problem?
avinash_bhud...
Contributor
2881 Points
517 Posts
Re: Problem with RegisterClientScriptBlock
Feb 15, 2012 08:45 AM|LINK
May be problem is the script can you post the script that you are registering?
tommyold85
Member
58 Points
19 Posts
Re: Problem with RegisterClientScriptBlock
Feb 15, 2012 08:54 AM|LINK
var mydata = [ {Cliente:"ARTIAMO A.C.",Sede:"C. GIOCHI ARTIAMO",Reparto:"",Denominazione:"C. GIOCHI ARTIAMO",Mensa:"C. GIOCHI ARTIAMO",PDC:"1176",Data:"", Ordine:"", IdCli:"1247|2451||PR|", Gruppo:""}, . . 200 records similar to the first . . ]; jQuery("#gridOrdini").jqGrid({ data: mydata, datatype: "local", height: 780, colNames:['Cliente','Sede','Reparto','Denominazione','Mensa','PDC','Data', 'Ordine', 'IdCli', 'Gruppo'], colModel:[ {name:'Cliente',index:'Cliente',sortable: true, width:15}, {name:'Sede',index:'Sede',sortable: true, width:15}, {name:'Reparto',index:'Reparto',sortable: true, width:15}, {name:'Denominazione',index: 'Denominazione',sortable: true, width:15}, {name:'Mensa',index:'Mensa',sortable: true, width:15}, {name:'PDC',index:'PDC',sortable: true, width: 4}, {name:'Data',index:'Data', sortable: true, width: 13}, {name:'Ordine',index:'Ordine', sortable: true , width: 7}, {name:'IdCli',index:'IdCli', hidden: true }, {name:'Gruppo',index:'Gruppo', sortable: true, hidden: true } ], multiselect: false, rowNum: 200, autowidth: true, shrinkToFit: true, onCellSelect: function(rowid, index, contents, event) {return LoadOrderFromTable(rowid);}, loadComplete: function() { setRowColor();}, caption: "" });tommyold85
Member
58 Points
19 Posts
Re: Problem with RegisterClientScriptBlock
Feb 15, 2012 08:56 AM|LINK
And i inject it into the page whit:
avinash_bhud...
Contributor
2881 Points
517 Posts
Re: Problem with RegisterClientScriptBlock
Feb 15, 2012 09:09 AM|LINK
You could try following ways to solve your issue.
1.Try debugging your script with firefox javascript debugger.
OR
2.After running your page GO to Firefox Menu->Tools->ErrorConsole.It displays all the script errors.
Find out the exact error and then try to solve it.
This may help you.