My Jquery function goes like this
<script language="javascript" src="jquery.js">
function TestJQ() {
alert("Inside a JQ Function");
}
</script>
I also added jquery.js file to project.
When i try to call this function from Silverlight project it throws an error Failed to Invoke
My Silver light code:
void MainPage_Loaded(object sender, RoutedEventArgs e)
{
HtmlPage.RegisterScriptableObject("silverlightApplication", this);
}
private void btnSubmit_Click(object sender, RoutedEventArgs e)
{
HtmlPage.Window.Invoke("TestJQ");
}
Important: When i remove the src value from script attribute, it works.
Can any one help on this?