Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Code for Adding Message and Confirmation Boxes Using
JavaScript?

Answer Posted / sivasubramanian.k

<html>
<head>
<script>
function message()
{
var str;
str="Click Ok to continue!!!";
alert(str);
}
function confirmation()
{
var str;
str="Are you sure to delete?Then click Ok or Cancel!!!";
confirm(str);

}
</script>
</head>
<body>
<form>
<h3>Click the button below which shows message box</h3>
<input type="submit" value="Click Me" name="submit"
onClick="return message()">
<h3>Click the button below which shows confirmation box</h3>
<input type="submit" value="Delete" name="delete"
onClick="return confirmation()">

</form>
</body>
</html>

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a code to generate pseudorandom numbes

2370


how to create Expandable and Collapsible Menus

3248


how to create a Custom Scrollbar

2549


code to detect versions of different browsers like internet explorer, netscape, mozilla, opera etc

2173


Reading which Non-Character Key was pressed

2247


code to get the coordinates of a Click Event

2232


How to encode and decode URL strings?

2307


how to create a Draggable element

2434


How to block double clicks

2113


Code to Block submission of form by pressing Enter Key

2507


code to images to rollover

2378


code to set the main window's size

2296


function to combine two or more arrays

2145


code to keep a page Out of the browser history

2077


write a code that user can choose/alter Body Text Size

2042