Reputation: 1
basically i have a value "truecount" and if this value is less than one i want an error message on screen Not an alert popup.
sorry but im a noob
Upvotes: 0
Views: 417
Reputation: 47667
Create a hidden element and change its' style to visible when your condition is met
if ( truecontent < 1 ) {
document.getElementById("message").style.display = "block";
}
<div id="message" style="display: none">
Your Message Here
</div>
Upvotes: 1
Reputation: 19591
There are lots of ways to show a message like
div
which is initially hidden, and shows on message.div
with any animation may be for good feel.For more on div popups
Go here or Here or Here
Upvotes: 0
Reputation: 229
Try considering using a javascript library like jquery. Place in your HTML a hidden layer
When it happens that your variable truecount becomes>1 just execute somthing like .... $('#ErrorReporting').html('Your alert Message').slideDown();
Upvotes: 1