[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Silverlight not calling Javascript

Posted on 2011-10-30
1
Medium Priority
?
260 Views
Last Modified: 2012-08-14
Ive writting a simple Silverlight App which should call a Javascript function from the calling page:-
In Silverlight, Im using the code:-
                    HtmlPage.RegisterScriptableObject("Page", Me)
                    HtmlPage.Window.Invoke("slComplete")

Open in new window


And then in my HTML page I have the following code:-
	<script type="text/javascript">
		function slComplete()
			{
			alert("Upload completed");
			}
	</script>	

Open in new window


Yet, I cannot get the alert to appear :-(

Any ideas what Im doing wrong?
0
Comment
Question by:tonelm54
1 Comment
 
LVL 22

Accepted Solution

by:
Mrunal earned 2000 total points
ID: 37056488
Are you using user control ?
if yes, you have to register that with RegisterScriptableObject too.

check these links:

http://forums.silverlight.net/p/10266/33114.aspx

also check basic requirements for silverlight:

http://www.dotnetspider.com/tutorials/Silverlight-Tutorial-321.aspx
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses
Course of the Month19 days, 21 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question