Tony
unread,Feb 14, 2009, 4:19:37 PM2/14/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to PHP-Ext
Hi
I want to create a button that opens a form.
I've got my own button class that, for the time being, just changes
the text of the button, just to see if I can achieve what I want:
<?php
include_once 'PhpExt/Button.php';
include_once 'PhpExt/Handler.php';
include_once 'PhpExt/Javascript.php';
class t_Button extends PhpExt_Button
{
function __construct()
{
parent::__construct();
$this->setText('t_button');
// $this->setHandler(new PhpExt_JavascriptStm("function(){alert
('yes');}"));
$this->setHandler(new PhpExt_Handler($this->testFn()));
}
function testFn()
{
$this->setText('changed');
// What I eventally want here is something like
// $dialog = new myNewUserDialog();
// etc
// where myNewUserDialog is my own custom dialog for creating
a new user for my app.
}
}
I feel as though I'm close, but the problem is that the event is fired
when the page is rendered, so that the text of the button is "changed"
as soon as the page is rendered and I never see it as "t_button".
Any ideas?
Thanks
Tony