Issue in getting a pop up

I haave an employee data in an oracle table.It contains the columns
employee_name,Employee_surname,XML_info_of_emloyee.
I am pulling the data to show in a windows report. And i want to show
employee name and surname of all the employees and the XML info as a pop
up when i click on Employee name or surname or a temporary field XML in
the window page.

I have prepared the ruby code to pull the data and display. The code
inputs all the columns to teh front end report. Need help in modifying
the code such that the XML info of each employee appears as a pop-up
whenever i click on the employee name. I am attaching the code here
with.

Ravi dk wrote:

I haave an employee data in an oracle table.It contains the columns
employee_name,Employee_surname,XML_info_of_emloyee.
I am pulling the data to show in a windows report. And i want to show
employee name and surname of all the employees and the XML info as a pop
up when i click on Employee name or surname or a temporary field XML in
the window page.

I have prepared the ruby code to pull the data and display. The code
inputs all the columns to teh front end report. Need help in modifying
the code such that the XML info of each employee appears as a pop-up
whenever i click on the employee name. I am attaching the code here
with.

That’s a HTML question, not a Ruby one. But you could try

123

or you could use Javascript with AJAX (e.g. jQuery)

Ravi dk wrote:

Here i am using all.each{|row| to consider all the rows and columns for
the final report. Please let me know the alternative so that i have to
print only 2 columns out of 3(let`s say) and entire number of rows.

<% all.each do |row| %>

<%= row[0] %> <%= row[1] %> etc <% end %>

You are currently using row.join(“sep”) which joins all the array
elements together.

If ‘all’ is an Array of Arrays, then the total number of rows is <%=
all.size %>

Note that you should be HTML-escaping the values before inserting them
into the page (consider what happens if row[0] contains < or &).

To keep the templates simple you could define a helper method ‘h’ like
Rails does. Then you’d use it like this:

<%=h row[0] %>

Brian C. wrote:

That’s a HTML question, not a Ruby one. But you could try

123

or you could use Javascript with AJAX (e.g. jQuery)

Hi Brian , Thanks for the reply. Can you please help me with the rubu
part fo the script.
Here i am using all.each{|row| to consider all the rows and columns for
the final report. Please let me know the alternative so that i have to
print only 2 columns out of 3(let`s say) and entire number of rows.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs