M micro Well-Known Member Licensed User Longtime User Oct 13, 2019 #1 Hi to all Excuse me but I'm still not very mature in creating web apps. I have a Toast.js, a simply file that customizes and displays toaster messages https://www.cssscript.com/super-simple-javascript-message-toaster-toast-js/ after starting the program the three files (toast.js, toast.min.js and toast.mod.js) are copied into Scripts folder. ....here I have a lot of confusion In BANano_Ready, i put Code: Copy #if Javascript function toastshow(text) { var toast = new iqwerty.toast.Toast(); toast.setText(text) .setDuration(3000) .show(); } #End If And for call this function: Code: Copy BANano.RunJavascriptMethod("toastshow", Array As String("Hello!")) but I don't see anything, where am I wrong? Thanks for your tips
Hi to all Excuse me but I'm still not very mature in creating web apps. I have a Toast.js, a simply file that customizes and displays toaster messages https://www.cssscript.com/super-simple-javascript-message-toaster-toast-js/ after starting the program the three files (toast.js, toast.min.js and toast.mod.js) are copied into Scripts folder. ....here I have a lot of confusion In BANano_Ready, i put Code: Copy #if Javascript function toastshow(text) { var toast = new iqwerty.toast.Toast(); toast.setText(text) .setDuration(3000) .show(); } #End If And for call this function: Code: Copy BANano.RunJavascriptMethod("toastshow", Array As String("Hello!")) but I don't see anything, where am I wrong? Thanks for your tips
Kiffi Well-Known Member Licensed User Longtime User Oct 13, 2019 #2 You do not need the inline code. just execute: Code: Copy BANano.RunJavascriptMethod("iqwerty.toast.Toast", Array( "Hello" ) ) or, if you want to use the options: Code: Copy Dim myOptions As Map = CreateMap() Dim mySettings As Map = CreateMap() mySettings.Put("duration", 1000) myOptions.Put("settings", mySettings) BANano.RunJavascriptMethod("iqwerty.toast.Toast", Array( "Hello", myOptions ) ) Further informations: https://github.com/mlcheng/js-toast Greetings ... Peter Upvote 0
You do not need the inline code. just execute: Code: Copy BANano.RunJavascriptMethod("iqwerty.toast.Toast", Array( "Hello" ) ) or, if you want to use the options: Code: Copy Dim myOptions As Map = CreateMap() Dim mySettings As Map = CreateMap() mySettings.Put("duration", 1000) myOptions.Put("settings", mySettings) BANano.RunJavascriptMethod("iqwerty.toast.Toast", Array( "Hello", myOptions ) ) Further informations: https://github.com/mlcheng/js-toast Greetings ... Peter
M micro Well-Known Member Licensed User Longtime User Oct 13, 2019 #3 Thanks Kiffi, now work! Upvote 0