Note that there are some explanatory texts on larger screens.

plurals
  1. POReferenceError: ajaxCall is not defined
    primarykey
    data
    text
    <p>I'm a little bit lost... I have a site, which has a lot AJAX calls. I tried with some JavaScript textfield formatting, but that was too difficult to handle, so I decided to go back to normal without it. But right now none of my Ajax calls are working and I don't know why... All I got is this error:</p> <pre><code>ReferenceError: name-of-the-call is not defined </code></pre> <p>The calls are locating in the "scripts.js" file and this is included in the header from the very begining.</p> <p>This is my header right now with an uploadify script and an arrow key navigation between the input fields.</p> <pre><code>&lt;head&gt; &lt;title&gt;The title&lt;/title&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt; &lt;link rel="stylesheet" type="text/css" href="style.css" /&gt; &lt;link rel="stylesheet" type="text/css" href="/scripts/uploadify.css"&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="/scripts/jquery.uploadify.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="scripts.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="/scripts/ajaxsubmit.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; &lt;?php $timestamp = time();?&gt; $(function() { $('#file_upload').uploadify({ 'formData' : { 'timestamp' : '&lt;?php echo $timestamp;?&gt;', 'token' : '&lt;?php echo md5('unique_salt' . $timestamp);?&gt;' }, 'height' : 25, 'buttonText' : 'bla bla...', 'onUploadSuccess' : function(file, data, response) { document.getElementById("uploadedId").innerHTML+='&lt;p style="margin: 0px;"&gt;&lt;img width="25px" src="/img/success.png" /&gt;&lt;b&gt;' + data + '&lt;/b&gt;&lt;/p&gt;'; var str = document.getElementById("uploadedFiles").value; if(str == ""){ document.getElementById("uploadedFiles").value=data; }else{ document.getElementById("uploadedFiles").value+=',' + data; } }, 'swf' : '/scripts/uploadify.swf', 'uploader' : '/scripts/uploadify.php' }); }); &lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function(){ $('body').on('keyup', 'input', function(e){ if(e.which==39) $(this).closest('td').next().find('input').focus(); else if(e.which==37) $(this).closest('td').prev().find('input').focus(); else if(e.which==40) $(this).closest('tr').next().find('td:eq('+$(this).closest('td').index()+')').find('input').focus(); else if(e.which==38) $(this).closest('tr').prev().find('td:eq('+$(this).closest('td').index()+')').find('input').focus(); }); }); &lt;/script&gt; &lt;/head&gt; </code></pre> <p>This is the JS code (one of them, because none of them is fowrking...) what doesn't want to work (this is in the scripts.js):</p> <pre><code>function companyVatnr(str){ if (str.length==0) { document.getElementById("companysearch").innerHTML=""; document.getElementById("companysearch").style.border="0px"; return; } if(str.length&gt;7){ 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 &amp;&amp; xmlhttp.status==200) { document.getElementById("companysearch").innerHTML=xmlhttp.responseText; document.getElementById("companysearch").style.border="1px solid #A5ACB2"; } } xmlhttp.open("GET","ajaxcompany.php?q="+str,true); xmlhttp.send(); } } </code></pre> <p>Can someone help me out, what could be the problem here?</p> <p>Thank you very much!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload