I have bootstrap on my site and I want to use a different alertbox when I communicate with the users....
I only use this one: http://bootboxjs.com/documentation.html#bb-alert-dialog
It is defined like this (I always use the large one, and always title "rsite") and I only change the message. I have tried to write a funcion that takes userMessage as argument and outputs this but with no luck. Can you see what I do wrong?
ReClamVersion = "0.4";
DEFINE
bootbox.alert({
size: "large",
title: ReClamversion,
message: "Your message here…",
})
My non working function
function rAlert(userMessage)
{
return "bootbox.alert({ message:'" + userMessage + "',size: 'large',¨title:" + ReClamVersion+ '});'
;}
I try to invoke it by rAlert("hi") but it doesnt work. Where should I put my script so I can use it on all my pages? I use php and include my header.php. Should I put the script there?