Javascript alert
Javascript AlertAn annoying thing when writing javascript is using the alert() function to send out debugging messages and data. The dialog box it gives you is a "modal" window so everything stops until you click Ok. Fine for one off messages and end of process values. But what happens if you want several values from a running process? Because writing down the values before clicking Ok gets a little tedious to say the least.
A quick method is to utilise the fact that javascript is a "soft" language, meaning that you can override built in methods with one of your own. So we can rewrite the alert() with
JAVASCRIPT Code :: InPage Alert
Click in the text to select the javascript code
<script type="text/javascript">
e = document.getElementById("msg")
function _
alert(message) {
e.innerHTML += message + "<br>"
}
</script>
this will redirect any message sent using the alert() method to an element with an id of msg on the page
HTML Code :: html
Click in the text to select the html code