OK. That's something good to remember. Thanks -----Original Message----- From: Andres Santos [mailto:asantos@xxxxxxxxx] Sent: 08 December 2005 15:44 To: php-objects@xxxxxxxxxxxxxxx Subject: Re: javascript thing Thanks Brian, but I already fixed it. It seems that the event handler modifications only work if you do something like this: document.getElementById("id_here").event_in_lowercase=another_funcion Notice that you don't need to put () after the function and also the event handler has to be spelled out in lowercase. Found that in here: http://www.eborcom.com/webmaker/tutorials/rhoque/event2.html (last line) Andres On 12/8/05, Brian Etheridge <Brian.Etheridge@xxxxxxxxxxx> wrote: > Try targeting the submit method: > document.getElementById("frmIntro").submit > > > -----Original Message----- > From: Andres Santos [mailto:asantos@xxxxxxxxx] > Sent: 08 December 2005 15:07 > To: php-objects@xxxxxxxxxxxxxxx > Subject: javascript thing > > Hi, > this is more a javascript related problem, but since im building the > application on php, you guys could help me. i implemented xajax as the > ajax motor for my aplication, so i MUST play a little bit with > javascript in some cases. here's the problem: > > I have a form with the id="frmIntro". In the xajax script, i make > this call in order to change the onsubmit value of a form dinamically: > $obj->addScript('document.getElementById("frmIntro").onsubmit="alert(\'Test! > \');"'); > but it just doesn't seem to work. > > i made several tries and it seems not to be working only when i try > to modify an onEvent value. > For example, this works: > > $obj->addScript('document.getElementById("frmIntro").action="else.php" > '); > > What am I doing wrong? For those who are not familarized with XAJAX, > just read the javascript part, it should be the same stuff. > > Thanks, > Andres S > > > > PHP Data object relational mapping generator - > http://www.meta-language.net/ Yahoo! Groups Links > > > > > > > > PHP Data object relational mapping generator - > http://www.meta-language.net/ > > > > ________________________________ > YAHOO! GROUPS LINKS > > > Visit your group "php-objects" on the web. > > To unsubscribe from this group, send an email to: > php-objects-unsubscribe@xxxxxxxxxxxxxxx > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > > ________________________________ > -- Slds, IIG Andres Santos Móvil: (593) 9 7026627 ******************************* e-sw: www.egobits.com blogs: www.egoblogs.net ******************************* ------------------------ Yahoo! Groups Sponsor --------------------~--> Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/I258zB/QnQLAA/TtwFAA/saFolB/TM --------------------------------------------------------------------~-> PHP Data object relational mapping generator - http://www.meta-language.net/ Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/saFolB/TM --------------------------------------------------------------------~-> PHP Data object relational mapping generator - http://www.meta-language.net/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-objects/ <*> To unsubscribe from this group, send an email to: php-objects-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/