Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
205
External javascript file
posted

Hello

I want the internal java code extract to a java file. In a normal ASP.NET app I copy the code into the js-file and append the reference to this in the aspx; like this:
<script type="text/javascript" src="App_JavaScriptFiles/global.js" />

But when I do this with the infragistics library I always get the following error:
Run-time error in Microsoft BLOCKED SCRIPT Sys.ArgumentException: Value must not be null for Controls and Behaviors.Parameter name: element
in the ScriptResource.axd in the function:
$create = $type.create = function Component$create(type, properties, events, references, element) {
....
if (e) throw e;
if (type.inheritsFrom(Sys.UI.Behavior) || type.inheritsFrom(Sys.UI.Control)) {

 
if (!element) throw Error.argument('element', Sys.Res.createNoDom);
.....

I simply don't understand what is wrong with this. In standard ASP.NET the script works correctly. And if I copy the code into the aspx file as inline script it's works also.

What I made wrong with this declaration?

Regards

Xaver

Parents
No Data
Reply
  • 12004
    posted

    Hello xbu58,

    For the controls by default uses WebResource.axd handlers for providing JavaScript code on the client browser. Are you wanting to reference the client code for the UltraWebMenu as a physical JavaScript file?

    Let me know if you have any questions with this matter. Thank you.

Children