-
Notifications
You must be signed in to change notification settings - Fork 0
Archive Trac dn mb
madscatt edited this page Jun 20, 2026
·
1 revision
Legacy Trac archive page imported from
dn_mb. Source: https://genapp.rocks/wiki/wiki/dn_mb. Review age, links, and examples before treating as current.
-
relevance: html5/php only
-
the javascript messagebox routine also implements buttons for callbacks
-
the user message box information is shown here
-
for internal usage, this is extended with callbacks as exemplified here
messagebox( {
icon : "toast.png",
text : "test message",
buttons : [
{ id : "button1",
label : "press button 1",
cb : callbackfunction1,
data : { name: "button 1" }
},
{ id : "button2",
label : "press button 2",
cb : callbackfunction2,
data : { name: "button 2" }
}
]
} );
- the above will produce two buttons and if pressed, close the messagebox dialog and call the 'cb' function value with 'data' value as a parameter
- for the file remove jstree contextmenu we use a variant of this
messagebox( {
icon : "warning.png",
text : fs_cache.delete_node_message( obj ),
buttons : [
{ id : "remove",
label : "Yes, remove these files",
cb : fs_cache.delete_node,
data : obj
},
{ id : "cancel",
label : "Cancel"
}
]
} );