I am using sharepoint 2010 and developing a visual web part. I had javascript functions in the ascx file, and they all used to work with the file. Now I moved them to a single javascript.js file and deployed it to the _layouts folder on the server.
And I put below line in ascx file to link to this file
<script src="/sites/xxxxx/_layouts/customwebparts/javascript.js" type="text/javascript"> </script>
and then in the ascx.cs file, and I use the methods defined in this file, for example,
btnCancel.Attributes.Add("onclick", "{return Action(Cancel the form?)};");
But it does not work, it does not display the restriction window ... I refer to the wrong path. Please help me....
source share