Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8916617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:16:52+00:00 2026-06-15T05:16:52+00:00

I got a task to pop up new window while clicking edit button.But i

  • 0

I got a task to pop up new window while clicking edit button.But i cannot get any solution for this. I have a class student and three attributes name,age and branch.I had created view through scaffolding.The task assigned to me is while clicking edit button,there should be a pop up window for edit those attributes.How can i do this? please help.I want to do this like jTable.
This is my index.html.erb

<table class="tablelist">
    <caption>Listing students</caption>
  <tr>
    <th>Name</th>
    <th>Age</th>
    <th>Branch</th>
    <th></th>

    <th></th>
  </tr>
<% @students.each do |student| %>
  <tr>
    <td><%= student.name %></td>
    <td><%= student.age %></td>
    <td><%= student.branch %></td>

    <td><%=link_to (image_tag("edit.png", :alt => 'Edit'), edit_student_path(student)) %></td>
    <td><%= link_to 'Destroy', student, :method => :delete, :data => { :confirm => 'Are you sure?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Student', new_student_path %>

controller of this student class is

def list
    @students = Student.all
    @jtable = {'Result' => 'OK','Records' => @students.map(&:attributes)}

    respond_to do |format|
      format.html # index.html.erb
      format.json { render :json => @jtable}
    end
  end

index.html.erb is

<html>
    <head>
        <%=stylesheet_link_tag "jtable_blue","http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css",:media => "all" %>
        <%= javascript_include_tag "jquery-1.8.3.min","http://code.jquery.com/ui/1.9.1/jquery-ui.js","jquery.jtable.min"%>
<script type="text/javascript">
    jQuery.noConflict();
    jQuery(document).ready(function () {
        jQuery('#StudentTableContainer').jtable({
            title: 'StudentList',
            actions: {
                listAction: '/students/list',
                createAction: '/students/newstudent',
                updateAction: '/students/edit',
                deleteAction: '/students/destroy'
            },
            fields: {
                id: {
                    key: true,
                    create: false,
                    edit: false,
                    list: false
                },
                name: {
                    title: 'name',
                    width: '40%'
                },
                sex: {
                    title: 'sex',
                    width: '20%'
                },
                branch: {
                    title: 'branch',
                    width: '30%'
                }

            }
        });

       jQuery('#StudentTableContainer').jtable('load');
    });
</script>
</head>
<body>

    <div id="StudentTableContainer">
    </div>
</body>
</html>

routes.rb is

match 'students/list' => 'students#list', :as => :list
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T05:16:53+00:00Added an answer on June 15, 2026 at 5:16 am

    How about instead of using a pop-up you , you use a pop-up modal like the one included in Twitter Bootstrap? Rails doesn’t handle pop-ups but you can generate them with javascript. There is also TopUp and prototype-window.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new in Java and have got as a task to find out,
I've got a chunk of code that looks like this: var task = Task.Factory.StartNew(()
I have a very simple task but got confused. I need my action to
I am not new to Django (1y work experience) but I have got a
I've got a Task<T>: Task<A> someTask = ... This task can result in being
Ok I got this task to do: There are 2 old URL's mysite.se/thepath and
So I got this task to make a program which will allow the user
I got a task related to ANCIENT C++ project which hasn't any documentation, comments
I've got a task in which I should capture specified text which cannot be
I got school task again. This time, my teacher gave me task to create

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.