Server IP : 51.89.169.208 / Your IP : 3.148.107.92 Web Server : Apache System : Linux ns3209505.ip-198-244-202.eu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Tue Nov 5 04:50:16 EST 2024 x86_64 User : yellowleaf ( 1019) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/yellowleaf/public_html/members/js/ |
Upload File : |
function showUser(str,num,e){ // creating results container for each box - if conainer does not exist if(!document.getElementById('category_box_'+num)){ var catAjaxEl = document.createElement('div'); catAjaxEl.setAttribute('id', 'category_box_'+num); catAjaxEl.setAttribute('class', 'category_box'); document.getElementById('cat_'+num).appendChild(catAjaxEl); } var unicode=e.keyCode; if(unicode==40||unicode==39||unicode==38||unicode==37||unicode==13){/*do nothing*/}else{ if (str=="") { document.getElementById('category_box_'+num).innerHTML=''; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else{// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById('category_box_'+num).style.display=''; document.getElementById('category_box_'+num).innerHTML=xmlhttp.responseText; }else{ // if no results - immediatley making hidden value as 'x' - would change once user chooses a category document.getElementById('category_hid_'+num).value='x'; // immediatley making hidden value as 'x' - would change once user chooses a category // global variable in drop_menu.js next=0; // next element prev=0; // previous element curr=0; // current element } } xmlhttp.open("GET","http://www.yellowleaf.co.uk/members/ajax/ajax_product.php?hint="+str+"&num="+num,true); xmlhttp.send(); } } function inputStrForm(str,num){ document.getElementById('category_box_'+num).style.display='none'; document.getElementById("category_"+num).value=str; }