A real working Login sample

15 views
Skip to first unread message

eudosia

unread,
Jan 31, 2009, 10:05:16 AM1/31/09
to PHP-Ext
Starting from example of ebarchiesi I correct some mistake he maded:
At this point:
// Items
$user = new PhpExt_Form_TextField();
$user->createTextField("loginUsername");
$user->setAllowBlank(false);
$user->setFieldLabel("Usuario");

$password = new PhpExt_Form_PassworField();
$password->createTextField("loginPassword");
$password->setAllowBlank(false);
$password->setFieldLabel("Contraseña");
THis code does'nt work 'couse due to a bug on Ext-php 0.8.3...Have to
be rewritten:
// Items
$user = new PhpExt_Form_TextField();
$user->createTextField("");
$user->setName("loginUsername")
$user->setAllowBlank(false);
$user->setFieldLabel("Usuario");

$password = new PhpExt_Form_PassworField();
$password->createTextField("");
$password->setName("loginPassword")
$password->setAllowBlank(false);
$password->setFieldLabel("Contraseña");
Also, on a successfull login no redirect will be made.........
var redirect
window.location = redirect
The window object is refferring to the window widget and not to the
browser window, so declaration is ambiguos.
you have to rename the ext window object to some else...eg: mywindow,
so statement window.location= redirect will work.
That's all.
Regards,
Max.
Reply all
Reply to author
Forward
0 new messages