// myalert.js // 230822 - remove site link to stop mistaken clicking // 301016 - added siteurl cybertrain.info //050912 - closealertbox() now includes an optional doafterclose() call // allows optional doafterclose() in main html file //Alertbox Replacement using javascript 28-06-06 author mike capstick // alertsetup(); //set up alertbox html and add to webpage // alertboxer(message); //where message is html to be displayed in alertbox // the messages are stored in js inside relevant html page // closealertbox() // close alertbox function alertsetup(){ // setup alertboxcontainer div with id using dom methods then populate it with slack .innerHTML method a = document.createElement("div"); //create div a.setAttribute("id","alertboxcontainer"); //set id document.body.appendChild(a); // add to body // now add contents of alertbox divcode="
"; document.getElementById('alertboxcontainer').innerHTML=divcode; } function alertboxer(x){ // first turnoff 'show thru select boxes' // create an array of the select elements selectarray=document.getElementsByTagName('select'); // hide select tags for (i=0;i