简体   繁体   中英

Trigger submit event created with codeigniter with backbone.js

Am learning my first steps on backbone.js..

Building an app in codeigniter, submit button triggers the function in application controller to send the data to the database..

<?php echo form_open('welcome/process_form','myform') . "\n"; ?>
<p><label for="value">Value: </label><?php echo form_input('value'); ?></p>
<p><label for="tags">Tags: </label><?php echo form_input('tags'); ?></p>
<?php echo form_submit('submit', 'Submit'); echo form_close();  ?>

As simple as that.. a simple codeigniter form and submit button..

Now i want to include backbone.js in the scenario and want it to perform the action obviously reload..

What features of backbone do i look for and get started..??

The documentation will probably be the best feature to look for...

http://documentcloud.github.com/backbone/#Model

Try to get a handle of what you need to do. Check out some of the (many) examples. Try to make something work then come back and ask a question about a specific problem you are having (if any).

Your question here sounds as if you created a form in CI and now want to use backbone.js Perhaps someone here will write the app for you, but generally the process works best when it's a team effort. ie try it yourself; if you get stuck come back for help with the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM