summaryrefslogtreecommitdiff
path: root/js/prototype-window-1.3/samples/dialog.html
blob: 7b75a46f9f2903e8ce29b732ba1fcf754182e50a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" version="-//W3C//DTD XHTML 1.1//EN" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<script type="text/javascript" src="../javascripts/prototype.js"> </script>
	<script type="text/javascript" src="../javascripts/effects.js"> </script>
	<script type="text/javascript" src="../javascripts/window.js"> </script>
	<script type="text/javascript" src="../javascripts/debug.js"> </script>
	<link href="../themes/default.css" rel="stylesheet" type="text/css"/>
	<link href="../themes/alert.css" rel="stylesheet" type="text/css"/>
	<link href="../themes/alphacube.css" rel="stylesheet" type="text/css"/>

	<title>dialog</title>
	
</head>

<body>
<a href="#" onclick="Dialog.alert()">empty alert dialog</a>
<br/>
<a href="#" onclick="Dialog.confirm()">empty confirm dialog</a>
<br/>
<a href="#" onclick="Dialog.info()">empty info dialog</a> (does not make sense because you will have to reload the page)
<br/>
<br/>
<br/>
<br/>
<a href="#" onclick="openAlert()">open alert dialog</a><br/>
<a href="#" onclick="openConfirm()">open confirm dialog</a><br/>
<a href="#" onclick="openAjaxConfirm()">open confirm dialog, dialog content is filled by an ajax call</a><br/>


<script type="text/javascript">
  function openAlert() {
   Dialog.alert("Add your <b>HTML</b> message here", {windowParameters: {className: "alphacube"}})
  }
  
  function openConfirm() {
    Dialog.confirm("Add your <b>HTML</b> message here<br/>Better than a classic javascript alert?", 
                   {top: 10, width:250, className: "alphacube", okLabel: "Yes", cancelLabel:"No"})
  }
  
  function openAjaxConfirm() {
      Dialog.confirm({url: "dialog_ajax.html", options: {method: 'get'}}, 
                     {top: 10, width:250, className: "alphacube", okLabel: "Yes", cancelLabel:"No"})    
  }
</script>

</body>
</html>