I use the following function to show a status message after a form submit from my asp.net page.. The function gets called but it(alertmsg div) doesn't seem to show up why?
function topBar(message) {
var $alertdiv = $('<div id = "alertmsg"/>');
$alertdiv.text(message);
alert($alertdiv);
alert($alertdiv.text(message));
$alertdiv.click(function() {
$(this).slideUp(200);
});
$(document.body).append($alertdiv);
setTimeout(function() { $alertdiv.slideUp(200) }, 5000);
}
What happens is both the alert statements show [Object object]
... I think both need to show different outputs... Any suggestion..
css:
#alertmsg
{
font-family:Arial,Helvetica,sans-serif;
font-size:135%;
font-weight:bold;
overflow: hidden;
width: 100%;
text-align: center;
position: absolute;
top: 0;
left: 0;
background-color: #404a58;
height: 0;
color: #FFFFFF;
font: 20px/40px arial, sans-serif;
opacity: .9;
}