Revonzy Mini Shell
// JavaScript Document
$(document).ready(function(){
$('#loading').hide();
//////////////////////////////////
// Add Sector form validation
////////////////////////////////////
$("#videoForm").validate({
rules:
{
videoLink:
{
required: true,
}
},
messages:
{
}
});// eof validation
/////////////////////////////////
// on click of edit button
/////////////////////////////////
$('#update').click(function(){
flag=$("#videoForm").valid();
if (flag==true)
{
$('#update').hide();
$('#loading').show();
var formdata = new FormData();
formdata.append('type', "updateVideoLink");
formdata.append('videoLink', $("#videoLink").val());
formdata.append('id', '1');
$.ajax({
type: "POST",
url: "video_curd.php",
data:formdata,
success: function(data){ //alert(data);
if(data==1)
{
$('#loading').hide();
$( "#dialog" ).dialog({
dialogClass: "alert",
buttons: {
'Ok': function() {
window.location.replace("index.php");
}
}
});
}
},
cache: false,
contentType: false,
processData: false
});//eof ajax
}// eof if condition
});
});
$(document).ready(function() {
$(".number").keydown(function (e) {
// Allow: backspace, delete, tab, escape, enter and .
if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 ||
// Allow: Ctrl+A, Command+A
(e.keyCode == 65 && ( e.ctrlKey === true || e.metaKey === true ) ) ||
// Allow: home, end, left, right, down, up
(e.keyCode >= 35 && e.keyCode <= 40)) {
// let it happen, don't do anything
return;
}
// Ensure that it is a number and stop the keypress
if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
e.preventDefault();
}
});
});
EliteHackz.ORG
Revonzy Mini Shell
root@revonzy.com