Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%=
- link_to('refresh', '/mycontroller/index', :remote => true)
- %>
- <div id="mydiv">
- <%=
- @mydata
- %>
- </div>
- $('#mydiv').html('<%= escape_javascript(@mydata) %>')
- function executeQuery() {
- $.ajax({
- //url: '/index',
- success: function(data) {
- $('#mydiv').html(data)
- }
- });
- setTimeout(executeQuery, 500);
- }
- $(document).ready(function() {
- setTimeout(executeQuery, 500);
- });
- $('#mydiv').html(data)
- $('#mydiv').load('/mycontroller/index #mydiv')
- def action1
- <your code here>
- end
- def action2
- <your code here>
- render :layout => false
- end
Add Comment
Please, Sign In to add comment