<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Panel in Form Manual Test</title>
</head>
<body class="yui3-skin-sam">
<h1>Panel in Form Manual Test</h1>
<form action="">
<div id="foo">
<div class="yui3-widget-bd">
Click the close button!
</div>
</div>
</form>
<script>
YUI({
skin : 'sam',
filter: 'raw'
}).use('panel', function (Y) {
var panel = new Y.Panel({
srcNode : '#foo',
headerContent: 'Panel',
centered : true,
width : 250,
modal : true,
render : true
});
Y.one('form').on('submit', function (e) {
alert('The form is submitting!');
});
});
</script>
</body>
</html>