yep, that's working now.
AFAICT
can I get the code and images?
document.onkeydown = capturekeyDown;
document.onkeyup = capturekeyUp;
<input type="hidden" id="current_key">
function capturekeyDown(e) {
if (document.all) {
var evnt = window.event;
keycode = evnt.keyCode;
}else{
keycode = e.keyCode;
}
document.getElementById('current_key').value=keycode;
}
function capturekeyUp(e){
// remove value
document.getElementById('current_key').value='';
}
function ajax_mod_state(id_item,the_date,the_num,e){
//catch key press
keycode=document.getElementById('current_key').value;
special_state="";
if(keycode=="16") special_state= "pm"; // SHIFT KEY
else if(keycode=="17") special_state= "pm"; // ctrl
else if(keycode=="18") special_state= "am"; // alt
else if(keycode=="80") special_state= "prv" // o
//else the_key= "ko";
// start class
ajax = new sack();
// define image span to update
state_elm=document.getElementById("state_"+the_date);
// set state loading while ajax is executed
state_elm.innerHTML = image_loading;
// define number for grahic to show (needed in completion function)
elm_num = the_num;
// call ajax file to update state
var the_url=update_url+"?id_item="+id_item+"&the_date="+the_date+"&special_state="+special_state;
//alert(the_url);
ajax.requestFile = the_url;
ajax.onCompletion =reset_state;
ajax.runAJAX();
}
|| ajax.response=="prv"
elseif($booked_days[$this_date]=="prv") $day_image='cal_prv_'.$day_counter.'.png';
Users browsing this forum: Bing [Bot] and 1 guest