Sie sind auf Seite 1von 1

:P101_USERNAME := apex_authentication.

get_login_username_cookie;
Select ISBN13 AS "Delete", ISBN13 AS ISBN13, TITLE, AUTHOR, PRICE, PUBLISHER, GE
NRE, PAGES
FROM BOOK
WHERE USER_ID =
(Select user_id FROM SH_USER_LOGIN WHERE UPPER(user_name) = UPPER(:P101_USERNAME
));
onclick="deleteBook(this,#ISBN13#)"
javascript:void(0);
function deleteBook(p_this, p_isbn13) {
// get the table row on which the user clicked
var tr = $(p_this).closest('tr');

// perform an asynchronous HTTP AJAX request using jQuery
$.ajax({
type: "POST",
url: "wwv_flow.show",
data: {
p_flow_id: $('#pFlowId').val(),
p_flow_step_id: $('#pFlowStepId').val(),
p_instance: $('#pInstance').val(),
x01: p_isbn13, // assign p_isbn13 to the g_x01 global variable
p_request: "APPLICATION_PROCESS=delete_book" // refer to the application
process
},
beforeSend: // executes while the AJAX call is being processed
function() {
// delete following HTML classes from the table row element
// could be possibly theme dependent
tr.removeClass('even');
tr.removeClass('odd');

// use jQuery's animate function to give the table row, and its children
, a red background
tr.children().hover(function() {
tr.children().animate({'backgroundColor': '#fbc7c7'}, 300);
}, function() {
tr.children().animate({'backgroundColor': '#fbc7c7'}, 300);
});
tr.children().animate({'backgroundColor': '#fbc7c7'}, 300);
},
success: // to be called if the request succeeds
function() {
// jQuery has difficulties animating inline elements
// that's why we wrap them in a div, which is a block element
tr.children().wrapInner('<div>').children().fadeOut(400, function() {
tr.remove(); // visually remove the row from the report
});
}
});
}

Das könnte Ihnen auch gefallen