Problem with Widget and Javascript

0
0
Hello
I have a javascript file, inserted in the project resources and in the widgets, “Resources.TestAudio.js” with a function
– FUNCTION–
function Test () {
alert(‘I’m here’);
}  
–CODE VB.NET – WIDGETS-
Dim Package As Wisej.Web.Widget.Package = New Wisej.Web.Widget.Package ()
Widget1.InitScript = resources.GetString (“Widget1.InitScript”)
Widget1.Options = CType (Wisej.Core.WisejSerializer.Parse (“{}”), Wisej.Core.DynamicObject)
Package.Name = “Resources.TestAudio.js”
Package.Source = Application.StartupUrl + “Audio /” + Package1.Name.ToString ()
Widget1.Packages.Add (Package)
If call the Widget1.Eval function(“alert (‘I’m here’);”) it works perfectly displaying the message while if I call the function inside the JS Widget1.Eval (“Test ()”) it doesn’t work for me.
Do you have any suggestions?
THANK YOU
  • You must to post comments
0
0

Hi Nello,

maybe the documentation helps you out here:

https://docs.wisej.com/docs/concepts/javascript-object-model

Please refer to the last paragraph in terms of the scope/registration of functions.
If it still does not work, please put together a compilable test case and post it here.

Best regards
Frank

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.