I try to call a function using the onClick command, but I get the error message "Cannot find the variable" in the Safari console and no action is taken. I do not see any errors, but I must miss something that leads to failure.
Link
<a href="JavaScript:void(0);" onclick="controlWallMonitor('layout','Playback');">Show playback layout</a>
Javascript
<script type="text/javascript"> $(document).ready(function() { function controlWallMonitor(variable, option) { var WallMonitor = "10.0.50.163:9000"; $.ajax({ url: 'changelayout.php?target=' + WallMonitor + '&variable=' + variable + '&option=' + option, }); return false; }; });
I’m sure that this will become incredibly obvious, but for almost 2 hours I was looking for and trying to work something out, and couldn’t let my life consider the problem.
Greetings.
source share