B4J Question jquery (dNotify) correct execution..?

micro

Well-Known Member
Licensed User
Longtime User
Hi to all
premise, I'm familiarizing with jquery.
I'm testing with the skeleton framework and b4j_ws with a dNotify.js
In a SK_Column i added:
B4X:
col.AddHTML($"<link rel="stylesheet" type="text/css" href="/dNotify/dNotify.css" media="screen" />"$)
This for CSS

In a SkeletonPage i added:
B4X:
S.AddScript($"<script type="text/javascript" src="/dNotify/jquery.min.js"></script>"$, True)
S.AddScript($"<script type="text/javascript" src="/dNotify/jquery.dNotify.js"></script>"$, True)

S.AddScript($"<script>
$( document ).ready(function() {
dNotify("", "");
});
</script>
"$,False)
This for script

is this all correct?

In ws module (WebSocket) in a Timer Sub
I use a JqueryElement variable called "notifica" and with
this code I wanted to display the notification, but nothing.
B4X:
notifica.SetHtml($"dNotify("show", {
    message: ${Main.messaggio},
    sticky: False,
    duration: 2000,
    Type: "good"
});"$)

I put in www folder another folder call dNotify with all the plugin files

Any help?
Thanks.

http://www.html.it/articoli/jquery-messaggi-di-notifica-con-dnotify-1/

P.S.
all the rest of the code in ws with b4j_ws.js and other Skeleton object works well
 
Last edited:
Top