Is it possible to slide the form
for Create and Edit
in the same page of index
without refreshing the page by using JavaScript without installing gem
? is it any example for this?
You need to have a unique html node in your page, for example,
<div id="main_content">
#Any of your conntent will go here
</div>
And you links should have remote=>true
.
Clicking on any link will request the create or edit form which will actually replace the content of the main_content
div.
Here is reference that you can follow => http://www.alfajango.com/blog/rails-3-remote-links-and-forms/
You should find tons of resources on this in web. Let us know about any specific problem implementing the above.
Some More Help:
Update:
Ok. If you are completely beginner then it might seem a bit tough. Then I would suggest to break the whole things up into smaller achievable steps. And achieve one by one. Eventually you will be successful.
Here are the steps that I would recommend:
I tried a make a simplest example of this. Find the codes here .
Share your problems of each step with us. Good luck.
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.