Solved

Pop-up Type Dialog when clicking cell in datatable

Posted on 2014-09-18
11
856 Views
Last Modified: 2014-09-26
Wow has this site been helpful.  I don't want to single anyone out for fear of missing someone but there have been a few very helpful experts on my journey through this process and I have learned a ton on the way.  I have one more task )for now).  on ththis page I would like to have a classic asp page/div/etc dialog "pop-up" when clicking on the person's name.  The asp code is already written...just need to know how to get it from a click on a specific name.

Thanks!
0
Comment
Question by:Bob Schneider
  • 5
  • 3
  • 2
11 Comments
 
LVL 32

Assisted Solution

by:Big Monty
Big Monty earned 200 total points
Comment Utility
Have you looked into jquerys modal dialog box?

http://jqueryui.com/dialog/

It's a bare  bones dialog box good for simple uses and can be customized a bit.

For something a bit more powerful check our LightView

http://www.nickstakenburg.com/projects/lightview/

I like e it a lot because it's simple to set up and the documentation is good
0
 

Author Comment

by:Bob Schneider
Comment Utility
Good choices.  Thank you!
0
 

Author Comment

by:Bob Schneider
Comment Utility
Oh, crap...but how do I get it to fire based on a click from a cell in my datatable.  Should I post a new question?
0
 
LVL 52

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 300 total points
Comment Utility
If you use http://getbootstrap.com/ there is a modal built into the framework.  It will make your front end a lot easier to manage and the modal code is easier as well.
0
 
LVL 52

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 300 total points
Comment Utility
I don't see a real answer here.  Do you need help with the actual code?
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:Bob Schneider
Comment Utility
Let me look at your link...I think you gave that to me before...sorry.  I will  repost as needed.
0
 
LVL 52

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 300 total points
Comment Utility
Do you need actual code or do  you understand what to do.  I don't see that just the link answer here is of any use. We can reopen up the question.
0
 

Author Comment

by:Bob Schneider
Comment Utility
Lets either re-open or I can post a new one.  I am certain I am going to need some assistance.
0
 

Author Comment

by:Bob Schneider
Comment Utility
Ok so I have downloaded bootstrap and unzipped it.  

1) Do I need to do install Bower and, if so, how?
2) Ditto with Grunt.
0
 
LVL 32

Accepted Solution

by:
Big Monty earned 200 total points
Comment Utility
I don't necessarily agree that Bootstrap is the way to go on this one. It has somewhat of a steep learning curve and since you have most of your front end already built out, this seems like overkill.

i found this discussion on the datatables forums, it seems to do what you're ultimately looking to fire a javascript function on a cell click:

$("#myTable tbody tr").live("click", function(event){
    var position = myTable.fnGetPosition(this); // getting the clicked row position
    var id = myTable.fnGetData(position)[0];    // getting the value of the first column
   // displayUserInfo(id);
   alert('You clicked on " + id );
    });

Open in new window


if you can get the alert to come up with the proper cell text, it'll be easy to make that into a nice pop up. All you need to do is change the datatable ID with the one you're using
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now