Tuesday, November 15, 2011

Change caption of alert box

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Demos : 99Points.info : JQuery Alert Box </title>

<style >
#heading
{
font-family:Georgia, "Times New Roman", Times, serif;
font-size:56px;
color:#CC0000;
float:left;}
a{
font-size:24px}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<link rel="stylesheet" href="jquery.alerts.css" type="text/css" media="screen" />
<script type="text/javascript" src="jquery.alerts.js"></script>

<!-- Example script -->
<script type="text/javascript">

$(document).ready( function() {

$("a#alert_button").click( function() {
jAlert('This is a custom alert box', 'Alert Box');
});

$("a#confirm_button").click( function() {
jConfirm('Can you confirm this?', 'Confirmation Box', function(r) {
jAlert('Confirmed: ' + r, 'Confirmation Results');
});
});

$("a#prompt_button").click( function() {
jPrompt('Type something:', 'Filled value', 'Prompt Box', function(r) {
if( r ) alert('You entered ' + r);
});
});

});

</script>


</head>

<body>
<img src="99.jpg" alt="" style="float:left" height="62" />
<a id="heading" href="http://99points.info/">Points.info Demos</a>
<br clear="all" />
<h1>JQuery Alert Boxes : ( Confirm Alert Prompt )</h1>



<div style="border:solid #666666 1px;" align="center">
<legend>Alert</legend>

<pre>
jAlert('Custom Alert Box', 'Alert Boz');
</pre>
<p>
<a href="#" id="alert_button">Alert</a>
</p>




<legend>Confirm</legend>
<pre>

jConfirm('Can you confirm this?', 'Confirmation Box', function(r) {
jAlert('Ok it is Fine: ' + r, 'Results');
});
</pre>
<p>

<a href="#" id="confirm_button">Confirm</a>
</p>



<legend>Prompt</legend>
<pre>
jPrompt('Type something:', 'Im here !', 'Prompt Box', function(r) {
if( r ) alert('your Value ' + r);
});

</pre>
<p>

<a href="#" id="prompt_button">Prompt</a>
</p>
</div>
<div style="border:solid #000000 1px; background:#CC3333; color:#FFFFFF" align="center">
<a style=" text-decoration:none; font-size:18px;color:#FFFFFF" href="http://99Points.info"> Codeigniter , JQuery PHP Helping Demos on 99Points.info</a>
</div>

</body>
</html>

No comments:

Post a Comment