h2hjastermereel
11-03-2006, 12:03 AM
Need help with a dialog control interacting with form based security, this is where I am:
<page>
<DOCTYPE>
<html>
<head>
<meta>
<title>YAHOO.widget.Dialog</title>
<script></script>
<script></script>
<script></script>
<script></script>
<script></script>
<script></script>
<link>
<link>
<link>
<link>
<script></script>
<script>
YAHOO.namespace('example.container');
function submitCallback(obj) {
var response = obj.responseText;
response = response.split("<!")[0];
document.getElementById("resp").innerHTML = response;
eval(response);
}
function submitFailure(obj) {
alert("Submission failed: " + obj.status);
}
function init() {
var handleCancel = function() {
this.cancel();
}
var handleSubmit = function() {
this.submit();
}
YAHOO.example.container.dlg = new YAHOO.widget.Dialog("dlg", { modal:true, visible:false, width:"350px", fixedcenter:true, constraintoviewport:true, draggable:false });
YAHOO.example.container.dlg.callback.success = submitCallback;
YAHOO.example.container.dlg.callback.failure = submitFailure;
var listeners = new YAHOO.util.KeyListener(document, { keys : 27 }, {fn:handleCancel,scope:YAHOO.example.container.dlg,correctScope:true} );
YAHOO.example.container.dlg.cfg.queueProperty("keylisteners", listeners);
YAHOO.example.container.dlg.cfg.queueProperty("buttons", [ { text:"Logon", handler:handleSubmit } ]);
YAHOO.example.container.dlg.cfg.setProperty('postmethod','none');
var handleManual = function(type, args, obj) {
alert("Manual submission of " + this.id + " detected");
}
YAHOO.example.container.dlg.manualSubmitEvent.subscribe(handleManual, YAHOO.example.container.dlg, true);
YAHOO.example.container.dlg.render();
}
YAHOO.util.Event.addListener(window, "load", init);
</script>
</head>
<body>
<YAHOO>
<div>
<div>
<h1>Logon Example</h1>
</div>
<div>
<button>Logon</button>
</p>
</div>
<div></div>
</div>
<div>
<div>Please Logon:</div>
<div>
<form>
<table>
<tr>
<td>User Name:</td>
<td><input></td>
</tr>
<tr>
<td>Password:</td>
<td><input></td>
</tr>
<!-- Save/Reset buttons
<tr>
<td>
<input>
<input>
</td>
</tr> -->
</table>
</form>
</div>
</div>
</body>
</html>
it is not working, any ideas?
<page>
<DOCTYPE>
<html>
<head>
<meta>
<title>YAHOO.widget.Dialog</title>
<script></script>
<script></script>
<script></script>
<script></script>
<script></script>
<script></script>
<link>
<link>
<link>
<link>
<script></script>
<script>
YAHOO.namespace('example.container');
function submitCallback(obj) {
var response = obj.responseText;
response = response.split("<!")[0];
document.getElementById("resp").innerHTML = response;
eval(response);
}
function submitFailure(obj) {
alert("Submission failed: " + obj.status);
}
function init() {
var handleCancel = function() {
this.cancel();
}
var handleSubmit = function() {
this.submit();
}
YAHOO.example.container.dlg = new YAHOO.widget.Dialog("dlg", { modal:true, visible:false, width:"350px", fixedcenter:true, constraintoviewport:true, draggable:false });
YAHOO.example.container.dlg.callback.success = submitCallback;
YAHOO.example.container.dlg.callback.failure = submitFailure;
var listeners = new YAHOO.util.KeyListener(document, { keys : 27 }, {fn:handleCancel,scope:YAHOO.example.container.dlg,correctScope:true} );
YAHOO.example.container.dlg.cfg.queueProperty("keylisteners", listeners);
YAHOO.example.container.dlg.cfg.queueProperty("buttons", [ { text:"Logon", handler:handleSubmit } ]);
YAHOO.example.container.dlg.cfg.setProperty('postmethod','none');
var handleManual = function(type, args, obj) {
alert("Manual submission of " + this.id + " detected");
}
YAHOO.example.container.dlg.manualSubmitEvent.subscribe(handleManual, YAHOO.example.container.dlg, true);
YAHOO.example.container.dlg.render();
}
YAHOO.util.Event.addListener(window, "load", init);
</script>
</head>
<body>
<YAHOO>
<div>
<div>
<h1>Logon Example</h1>
</div>
<div>
<button>Logon</button>
</p>
</div>
<div></div>
</div>
<div>
<div>Please Logon:</div>
<div>
<form>
<table>
<tr>
<td>User Name:</td>
<td><input></td>
</tr>
<tr>
<td>Password:</td>
<td><input></td>
</tr>
<!-- Save/Reset buttons
<tr>
<td>
<input>
<input>
</td>
</tr> -->
</table>
</form>
</div>
</div>
</body>
</html>
it is not working, any ideas?