Try using an event handler instead. Probably "onsubmit" is what you want.
If you have the time and interest I'd suggest looking into moving javascript to unobtrusive functions. You first make everything work without javascript and then attach javascript to page elements, ids or classes. I think all the popular javascript frameworks support this in slightly different ways. Another upside is that, to me, the javascript becomes more structured and logical and it promotes creating reusable functions. On Apr 29, 7:48 am, Nic <[email protected]> wrote: > Hi there! I having some problems trying to call a java script from the > action's forms. > > - What I need is something like this: > <form action="javascript:parent.doForm();"> > > what I got is this: > <form id="UserJavascript:parent.doForm();Form" method="post" action="/ > users/javascript:parent.doForm();"> > > - my php code is: > > login.ctp (file): > e($form->create(array('action' => 'javascript:parent.doForm();'))); > > how can I call the javascript using the "form" object? > > Thank for your time > Nicolas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
