I have problem with post form with jquery |
[eluser]Thorpe Obazee[/eluser]
[quote author="painting753" date="1246222199"]If your just using the controller name because your looking for an easy url, maybe you could try setting up a route that would direct to the needed function. I don’t know of any restrictions.. Also, if your using jQuery to perform your post, there is no need to wrap your inputs in a form tag. The form tag is used to bundled everything up when you use an html submit button. It finds all inputs within that form tag and submits those. Using jQuery you have specifically tell it what items to send, eliminating the need for the form tag. Regards & Thanks Harry Picture to Painting Photo to portrait[/quote] Spam: Copied from: http://ellislab.com/forums/viewthread/121102/#601140
[eluser]pickupman[/eluser]
Be careful when removing the <form> tag as your page will not degrade gracefully if someone has javascript disabled. Build your form as usual, and then implement jQuery 2nd.
[eluser]darkside9[/eluser]
Thanks Guys My problem occurred because I forget adding the language before the controller name, and my problem with form submission with jquery occurred when I forget adding the language before the controller name. Code: <form id=“search_form” action=”<?php echo site_url()?>en/search” method=“post”> Code: class Search extends Controller { the above code working fine
[eluser]pickupman[/eluser]
For your <form> tag you should change your action attribute to: Code: <?php echo site_url('search');?> For jQuery you can use Code: <scr|pt type="text/css"> |
Welcome Guest, Not a member yet? Register Sign In |