Skip to main content

Microsoft Silverlight

Answered Question Runtime error in Microsoft JScript (Invoke)RSS Feed

(0)

m.saad
m.saad

Member

Member

8 points

12 Posts

Runtime error in Microsoft JScript (Invoke)

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 nanavati
jay nana...

Contributor

Contributor

3388 points

624 Posts

Answered Question

Re: Runtime error in Microsoft JScript (Invoke)

 Hi, the parameter of add method i and j are type of integer and you supply height and width of type Double.

Jay K Nanavaty
www.technologyopinion.com
Mark as answer if it helps. It will also help others...

m.saad
m.saad

Member

Member

8 points

12 Posts

Re: Runtime error in Microsoft JScript (Invoke)

Hi, the convertion of the parameter of the add method was busy. thank you. 

Jonathan Shen – MSFT
Jonathan...

All-Star

All-Star

24939 points

2,425 Posts

Microsoft
Answered Question

Re: Runtime error in Microsoft JScript (Invoke)

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

Jonathan Shen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

petter12345
petter12345

Member

Member

8 points

4 Posts

Re: Runtime error in Microsoft JScript (Invoke)

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 Error
Unterminated String Constant
Line: 1, Column 29

and

Microsoft JScript Runtime Error
Object Expected
Line 1, Column 0

I 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 rakeback


Line 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,

 

petter12345
petter12345

Member

Member

8 points

4 Posts

Re: Runtime error in Microsoft JScript (Invoke)

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 Error
Unterminated String Constant
Line: 1, Column 29

and

Microsoft JScript Runtime Error
Object Expected
Line 1, Column 0

I 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 rakeback


Line 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,

 

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities