Hi All, Does anyone know how to get the data of the field in the selected
row when the user right click on instead of the data of the whole row.
<script>
//Function to handle context menu appearing/disappearing
$(function() {
var contextMenu = $("#contextMenu");
var $rowClicked
//body on contextmenu is the event for right clicking
$(document.body).on("contextmenu", "table tr", function(e) {
*alert($(this).text()); // i need the data of one
field instead of the data of the whole row when the user right click. *
contextMenu.css({
display: "block",
left: e.clientX,
//TODO: figure out why I have to hardcode this value to get
the menu to appear in correct place
//...Y axis page value not correctly displaying on table
top: e.clientY - 80
});
return false;
});
var plot_context_menu = $("#plot_context_menu");
var table_container = $("#table_container");
var plot_container = $("#plot_container");
plot_container.hide();
$(plot_context_menu).click(function(e) {
$('#contextMenu').hide();
table_container.attr('class', 'col-md-6');
plot_container.show();
return false;
});
$('#plot_choice').change(function () {
$('#plot_choice option:selected').each(function(){ <!-- if new file
in the drop down menu selected, hide class named plot_path, and display the
selected id (each file in the menu is assoicated with ID) -->
var graph = $( this ).val()
$('.plot_path').hide();
$('#' + graph).show();
})
}).change();
});
</script>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/0443805e-d66c-472a-828a-2fd0da1de478%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.