One form with two buttons |
[eluser]chaotiq[/eluser]
Hello, I am new to CI and a MVC framework in general. I am not sure how to ask this and I have hit a wall. I have one form and two buttons. If a user clicks the first button data gets posted to a method in a controller. This method has a parameter with a default value of FALSE. If the user clicks the second button I want the data to get posted to the same method, but change the parameter to TRUE. For the first button, I set the type as submit and the form action is set to the controller. This posts the data and every thing works fine. The second button has an onClick event and calls a javascript function. I want the javascript function to post the data and change the parameter to TRUE. From reading I know you can set the value of parameters of methods in the uri like ./controller/method/value Can you specify boolean variables in the url? Such as, http://mysite.com/index.php/controller/method/TRUE So what I need is to post data to ./controller/method/TRUE via javascript. Can this be done? Thank you for any help anyone can give me. |
Messages In This Thread |
One form with two buttons - by El Forum - 01-19-2010, 10:53 PM
One form with two buttons - by El Forum - 01-19-2010, 11:07 PM
One form with two buttons - by El Forum - 01-19-2010, 11:40 PM
One form with two buttons - by El Forum - 01-20-2010, 03:03 AM
One form with two buttons - by El Forum - 01-20-2010, 07:20 AM
One form with two buttons - by El Forum - 01-20-2010, 07:24 AM
One form with two buttons - by El Forum - 01-20-2010, 08:24 AM
|