markus_pluess
asked on
Javascript is loaded only in IE9 Compatibility Mode
Hallo,
I have a really strange issue.
My Application loads some user-controls (.ascx) dynamicly.
For some of them i need a javascript function that is stored in
Scripting/LiteUCScripts/Li teUCSripts .js
so i tried to register this script in Init and Load events of my UserControl.
with:
like also on the Usercontrol-Page with:
The Issue:
Javascript-File would be only registered if the Browser is in IE9 Compatibility Mode!
Turning the IE in default Mode IE9 the Javascript results in not registered Javascript file.
I will not register it on Masterpage or elsewhere, because i will that my usercontrol can be simply used in other projects, and so that developpers dont have to invest immensely effort to implement this control in their projects.
Does somebody has a idea why this is not working in IE9 default Mode.
I have a really strange issue.
My Application loads some user-controls (.ascx) dynamicly.
For some of them i need a javascript function that is stored in
Scripting/LiteUCScripts/Li
so i tried to register this script in Init and Load events of my UserControl.
with:
Dim sPath As String = Page.ResolveClientUrl("~/Scripting/LiteUCScripts/LiteUCSripts.js")
Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "LucJS", sPath)
like also on the Usercontrol-Page with:
<script src="<%= ResolveClientUrl("~/Scripting/LiteUCScripts/LiteUCScripts.js") %>" type="text/javascript"></script>
The Issue:
Javascript-File would be only registered if the Browser is in IE9 Compatibility Mode!
Turning the IE in default Mode IE9 the Javascript results in not registered Javascript file.
I will not register it on Masterpage or elsewhere, because i will that my usercontrol can be simply used in other projects, and so that developpers dont have to invest immensely effort to implement this control in their projects.
Does somebody has a idea why this is not working in IE9 default Mode.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Great. Thanks for the points.
ASKER
Thousand thanks!