添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
I've done a small .Js file to store all my small javascript functions inside.
And by now all of them worked fine.
Now I'm trying to put this function inside that file and it directly fails...
JavaScript
function onChangeComboBox(parametre, idDesti, php) xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function () if ( this .readyState == 4 && this .status == 200 ) document .getElementById(idDesti).innerHTML = this .responseText; xmlhttp.open( " POST" ,php+parametre, true ); xmlhttp.send(); After the MadMyche suggestion, I've seen the error message is "temps.php:29 Uncaught ReferenceError: onChangeComboBox is not defined
at HTMLSelectElement.onchange (temps.php:29)"

viewed the page source code and opened the script file to see that the function is not there! even I can see it if I edit the file...
I'm sure I'm missing something stupid, but can't see it.
Thank you very much for your time and help!
What I have tried:
Different syntax in the path...
  • Read the question carefully.
  • Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  • If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  • Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question. Let's work to help developers, not make them feel stupid.
  •