File: sample.html

Recommend this page to a friend!
  Classes of Prakash Mohankumar   Genie Alert   sample.html   Download  
File: sample.html
Role: Example script
Content type: text/plain
Description: Sample file for GenieAlert implementation
Class: Genie Alert
Customized Javascript Alert
Author: By
Last change:
Date: 12 years ago
Size: 2,136 bytes
 

Contents

Class file image Download
<!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=iso-8859-1" /> <title>GenieAlert Sample</title> <!-- The JavaScript Source at https://github.com/prakashm88/geniealert and http://code.google.com/p/geniealert/ Created by: Prakash Mohankumar | http://itechgenie.com/ This product is distributed under the GNU General Public License Version 2 (Read LICENSE.txt for more details). --> <script type="text/javascript" src="geniealert.inc.js"></script> <link href="style.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" > var genieAlert = new GenieAlert(); genieAlert.title = "GenieAlert Title" ; genieAlert.image = "images/alert.png" ; function AdvCallAlert() { var genieAlerta = new GenieAlert(); genieAlerta.title = "GenieAlert!" ; genieAlerta.buttonLabels = ["Yes", "No", "Cancel"] ; genieAlerta.buttonFunctions = ["YesFunction()", "NoFunction()", "CancelFunction()"] ; genieAlerta.image = "images/info.png" ; genieAlerta.show("Click on the following buttons to call the corresponding methods."); } function CallAlert() { genieAlert.show("Sample Alert") ; } function YesFunction() { document.getElementById('clickResult').innerHTML = "YesFunction" ; var genieAlertb = new GenieAlert(); genieAlertb.image = "images/alert.png" ; genieAlertb.show("YesFunction called"); } function NoFunction() { document.getElementById('clickResult').innerHTML = "NoFunction" ; var genieAlertc = new GenieAlert(); genieAlertc.image = "images/error.png" ; genieAlertc.show("YesFunction called"); } function CancelFunction() { document.getElementById('clickResult').innerHTML = "CancelFunction" ; } </script> </head> <body> <input type="button" value="Simple Alert" onclick="CallAlert()" /><br/> <input type="button" value="Advanced Alert" onclick="AdvCallAlert()" /> Function Called: <span id="clickResult"> </span> </body> </html>