Page 1 of 1

$.get call not working

Posted: Mon Jan 25, 2016 5:01 pm
by KenHorse
The python script works fine and should return HTML. I don't see the output of the python script on the calling HTML page.

Code: Select all

<HEAD>

<link rel="stylesheet" type="text/css" href="stylesheet.css">
</HEAD>
<body style="text-align:center" onload="myFunction()">
<H3>Your firmware is being loaded. Please standby......</H3>

<img src = "images/ajax-loader.gif">
</body>

<script  src="jquery.js"></script>
<script>
function myFunction() {	 
	$.get("webupdater.py", function(data));
	document.write("Data: " + data);	
}
</script>

Re: $.get call not working

Posted: Mon Jan 25, 2016 5:10 pm
by element121
Do you see any errors in the Console, and can you see the call being made in the Network tab?

Re: $.get call not working

Posted: Tue Jan 26, 2016 8:21 am
by KenHorse
Console shows:
ReferenceError: myFunction is not defined
(MyFunction is defined correctly, yes?)

Networks does show the call