Skip to content

Instantly share code, notes, and snippets.

View AmrAbdeen's full-sized avatar

Amr AmrAbdeen

  • Egypt, Northern coast
View GitHub Profile
window.onerror = function () {alert("##############");}
@AmrAbdeen
AmrAbdeen / numonly.js
Created January 30, 2016 20:32
Number Only accepted into JS
function numonly(evt){
//onkeypress="return numonly(event)"
var charCode = (evt.which) ? evt.which : evt.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
@AmrAbdeen
AmrAbdeen / apex_err_msg.sql
Last active November 10, 2016 05:22
apex error msg
apex_error.add_error (p_message => 'check total after dedecation(Discount)',
p_display_location => apex_error.c_inline_in_notification );
APEX_ERROR.ADD_ERROR (
p_message => 'The employee name can´t be null',
p_display_location => apex_error.c_inline_with_field_and_notif ,
p_page_item_name => 'P1_ENAME');
/** ###### PLEASE TAKE ATTENTION ###### //
* (( $v(), $s(), $x(), apex.item )) are APEX API "SHOULD BE" using them instead of JQ, Just i added some JQ here as more info for you - in some cases the JQ returns some diff results so the API is better to use it always .. Take care..
---------------------------------------------------------------------------- */
// Getting Item Value
$v("P2_ENAME"); /* it's same same */ apex.item( "P2_ENAME" ).getValue(); /* it's same same */ $("#P2_ENAME").val();
// Set Item with Value
$s("P2_ENAME",'AMR'); /* it's same same */ apex.item( "P2_ENAME" ).setValue('AMR'); /* it's same same */ $("#P2_ENAME").val('AMR');