Dear Team,
I have JavaScript file my_js.js which has Helloworld() function.
The function will return the alert saying “Helloworld”
Please let me know, how can i import this .js file in my project to call the Helloworld function on button click event.
Thanks in advance.
P Vishal
Hi Vishal,
there are a couple of options in Wisej.
Here are a few:
Please refer to https://wisej.com/docs/html/JavaScript.htm
Then you can either attach to the server side click event and call your code on the client:
Or use the JavaScript extender (drop it on the container of your button) and edit the JavaScriptEvents property:
Please note that our upcoming Wisej 2 release does not need the JavaScript extender for this anymore.
All components have those 3 javascript properties by default allowing a very tight and easy integration
of server and client code.
Hope that helps.
Best regards
Frank
Hi Vishal,
there are a couple of points that prevent your sample from working:
A different approach to having Wisej bundle the resources can be to included it in default.html with simple html <include src …. directives
Finally you could also use the JavaScript extender and reference your JavaScript file there.
Hope that helps.
Best regards
Frank
Dear Team,
I have tried first case with resources adding, but its not working.
I have attached the project here.
Please let me know where is the issue.
Thanking you,
P Vishal
Please login first to submit.