$.get call not working

Javascript coding ..

Moderators: egami, macek, gesf

Post Reply
KenHorse
New php-forum User
New php-forum User
Posts: 18
Joined: Sat Dec 26, 2015 12:18 pm

Mon Jan 25, 2016 5:01 pm

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>
Last edited by KenHorse on Tue Jan 26, 2016 8:17 am, edited 1 time in total.

element121
php-forum Fan User
php-forum Fan User
Posts: 606
Joined: Sat Jun 06, 2015 11:46 am
Contact:

Mon Jan 25, 2016 5:10 pm

Do you see any errors in the Console, and can you see the call being made in the Network tab?

KenHorse
New php-forum User
New php-forum User
Posts: 18
Joined: Sat Dec 26, 2015 12:18 pm

Tue Jan 26, 2016 8:21 am

Console shows:
ReferenceError: myFunction is not defined
(MyFunction is defined correctly, yes?)

Networks does show the call

Post Reply