My html code:
<form id="room-from" method="post">
<input id="room" type="text" name="room" />
<input type="submit" id="save" name="save" />
</form>
when i press the save button if the room text field is empty a pop up should appear at the center of the screen and must say enter a room number.
jquery:
$("#save").submit(function(){
if ( $("#room").val() == "")
{
}
});
I’m not sure how to do this.
Can anyone please help me out on this.
you should use modal window and jQuery UI it will make your life easy
http://jqueryui.com/demos/dialog/