Skip to content

Instantly share code, notes, and snippets.

@tmaslen
Created July 30, 2009 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmaslen/158618 to your computer and use it in GitHub Desktop.
Save tmaslen/158618 to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB" lang="en-GB">
<head profile="http://dublincore.org/documents/dcq-html/">
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!--[if IE]><![if gte IE 6]><![endif]-->
<script src="http://www.bbc.co.uk/glow/1.5.1/core/core.js" type="text/javascript"></script>
<script src="http://www.bbc.co.uk/glow/1.5.1/widgets/widgets.js" type="text/javascript"></script>
<link href="http://www.bbc.co.uk/glow/1.5.1/widgets/widgets.css" type="text/css" rel="stylesheet" />
<script type="text/javascript">
glow.ready(function(){
// ADD THE FORM
var myForm = new glow.forms.Form("#register");
myForm.addTests(
"username", // the field we are testing has the name "username"
["required"] // a valid username value cannot be empty
);
myForm.addTests(
"email", // the field we are testing has the name "email"
["required"], // a valid username value cannot be empty
["isEmail"] // and must be formatted like an email address
);
// ADD THE PANEL
//create Panel instance
var myPanel = new glow.widgets.Panel("#simplePanel");
//display panel
myPanel.show();
});
</script>
<style type="text/css">
span {display: block; float: left; width: 100px;}
</style>
<!--[if IE]><![endif]><![endif]-->
</head>
<body>
<div id="simplePanel">
<h2 class="hd">My simple panel</h2>
<div>
<form id="register">
<span>username:</span><input type="text" name="username" id="username" /><br />
<span>email:</span><input type="text" name="email" id="email" /><br />
<input type="submit" />
</form>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment