Re: Re: upgrade-all broke something

From: Date: Fri, 06 Oct 2006 17:53:38 +0000
Subject: Re: Re: upgrade-all broke something
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25373@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Thanks for the advice. Not sure if I can use the setDefaults() function with the way this code is written, at least without changing a bunch of other stuff. I'll have to check into that. T. Justin Patrin wrote: > On 10/6/06, Troy Cregger <tcregger@kennedyinfo.com> wrote: > > Please respond in-line. > >> Yup, it works with the previous version.. I just installed >> HTML_QuickForm 3.2.5 and that fixed the problem. >> >> Now... how do I find out what the reason for this is? I'm fairly new to >> PEAR but am willing to contribute in any way I can. >> >> Later (when I'm not at work) I'll document this experience, maybe it >> will help others. >> >> Here's the simple version. (typo corrected this time) >> >> In the source php file I have something like: >> $t = &HTML_QuickForm::createElement('checkbox', 'Check:', >> 'Select', null, >> array('checked' => '', >> 'onClick' >> => 'javascript:update();', >> 'class' => 'checkbox')); > > As others have said, you should be usin setDefaults(), not setting the > checked attribute manually. > >> >> The update() function referenced above is in a smarty template. >> >> HTML_QuickForm 3.2.5 calls the function and the form 'updates' with the >> new values, details about the JS I don't think are relevant since the >> problem is that in HTML_QuickForm 3.2.6 the script does not execute at >> all. >> > > The first thing you should do it view the source on the generated > form. Compare the 2 and try to see if the attributes are the same and > that your JS is even in the page. Once you've figured this out you can > backtrack what code is making the problem happen. > >> Thanks for the help, and if I happen to find out why this happened I >> will post it. >> T. >> >> >> Troy Cregger wrote: >> > Hmm good point... I inherited this code from a previous developer so I >> > didn't see the typo. Thanks for pointing that out. >> > >> > Trying it now. >> > >> > Nope... still not working. >> > >> > The elements are checked when the form loads... >> > >> > This was working with the last version HTML_QuickForm 3.2.5 stable >> but >> > not now with HTML_QuickForm 3.2.6 stable >> > >> > Wondering if there's a change in the way I have to call the script? >> > >> > Bertrand Mansion wrote: >> >>> Troy Cregger wrote: >> >>> >> >>>> -----BEGIN PGP SIGNED MESSAGE----- >> >>>> Hash: SHA1 >> >>>> >> >>>> sorry, code is here. >> >>>> $t = &HTML_QuickForm::createElement('checkbox', >> >>>> 'ckItem', 'Select:', >> >>>> null, array('checked' => '', 'onClick' >> >>>> => 'javscript:update();', >> 'class' >> >>>> => 'checkbox')); >> >>> I doubt it can work with 'javscript:' ... >> >>> >> >>> Furthermore, you should use setDefaults() to set the checked >> status of your >> >>> element, but that's up to you. >> >>> > > - -- Troy Cregger Lead Developer, Technical Products. Kennedy Information, Inc One Phoenix Mill Ln, Fl 3 Peterborough, NH 03458 (603)924-0900 ext 662 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFJpginBEWLrrYRl8RAsUWAJ9E4mwOOw3RurJSVM8pkXoRZ6KjhgCeOi2w O+b13XO+KOdwSmGuewTT94o= =ENCy -----END PGP SIGNATURE-----

« previous php.pear.general (#25373) next »