Skip to main content
Home Forums Silverlight Programming Programming with JavaScript Runtime error in Microsoft JScript (Invoke)
5 replies. Latest Post by petter12345 on June 12, 2009.
(0)
m.saad
Member
8 points
12 Posts
06-01-2009 8:38 PM |
Hello,
i m trying to call this method
object obj = HtmlPage.Window.Invoke("add", width, height);
but i get the following error
Runtime error in Microsoft BLOCKED SCRIPT Unhandled Error in Silverlight 2 Application Error on Invoke: add. on System.Windows.Browser.ScriptObject.Invoke(String name, Object[] args) on CameraCalibrationSupportSystem.Page.Add(Int32 i, Int32 j) on CameraCalibrationSupportSystem.Page.Button_Click(Object sender, RoutedEventArgs e) on System.Windows.Controls.Primitives.ButtonBase.OnClick() on System.Windows.Controls.Button.OnClick() on System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e) on System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e) on MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
the jscript method:
function add(i, j) { return (i+ j); }
please i need help!
Thanks!
msaad
jay nana...
Contributor
3388 points
624 Posts
06-04-2009 2:37 PM |
Hi, the parameter of add method i and j are type of integer and you supply height and width of type Double.
06-06-2009 6:31 PM |
Hi, the convertion of the parameter of the add method was busy. thank you.
Jonathan...
All-Star
24939 points
2,425 Posts
06-08-2009 6:03 AM |
Hi Msaad,
m.saad: object obj = HtmlPage.Window.Invoke("add", width, height);
Please do it like this.
HtmlPage.Window.Invoke("testFun", new object [] { 10, 15 });
Best regards,
Jonathan
petter12345
4 Posts
06-12-2009 6:07 AM |
Hello,First of all, I apologize if this question has been asked before. I searched the forum, but did not quite see an exact answer to the errors I am seeing.Here are the details:I am using Adobe Illustrator CS2 (version 12) to create SVGs (screen captures of custom software with menus). Using Adobe Illustrator CS2, I am creating mouse overs on the menus in my screen shots.The problem occurs when I open the completed SVG in IE6 and IE7.Here is the error messages that occur when I move the mouse over any of the menus in my SVG:Microsoft JScript Compilation ErrorUnterminated String ConstantLine: 1, Column 29andMicrosoft JScript Runtime ErrorObject ExpectedLine 1, Column 0I believe that the errors are related to IE as I can view the SVG in Opera 9.01, Firefox 2 Beta 1, SeaMonkey and the latest version of Netscape. I am using Adobe SVG Viewer 3.03. Systemes roulette FT rakebackLine 1 of the SVG code is the standard:<?xml version="1.0" encoding="utf-8"?>I have tried adjusting the settings in IE, but I am at a loss.Any assistance on this issue, is very much appreciated.Thanks,
06-12-2009 6:08 AM |