The Joomla! Forum ™



Forum rules


Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Feb 21, 2012 10:23 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Aug 19, 2009 9:47 pm
Posts: 32
Location: Bogotá, Colombia
Hello everyone,

I want to have a form that calls a different method depending on what button is pressed, and I was wondering what would be the right way to do something like this. Should I try changing the task value via javascript or should I try something else?

Cheers,

M.


Top
 Profile  
 
PostPosted: Tue Feb 21, 2012 2:01 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Sun Sep 05, 2010 7:33 am
Posts: 63
Easiest way is the second method, parse the task value via javascript by adding an onclick event to your buttons, something like onclick="document.adminForm.task.value='controllername.yourtask'", place the yourtask function inside controller and should work just fine.

_________________
Joomla! Extensions
http://www.beesto.com


Top
 Profile  
 
PostPosted: Fri Feb 24, 2012 2:09 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Aug 19, 2009 9:47 pm
Posts: 32
Location: Bogotá, Colombia
Thanks, I'll give it a try.

Regards,

M.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 



Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group