<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Isaac's site</title>
</head>
<script type="text/javascript">
var x = 0;
function myloop() {
for ( var x = 0; x <= 100; x++) {
document.write(x%11);
if (x%11==10) {
document.write("<p></p>");
}
}
}
</script>
<body>
<form><input type="button" onclick="myloop()" value="Mybutton"> </form>
</body>
</html>
I'll get there eventually. I'm taking my time. I'm also able to do all my coding and testing within eclipse, which I really like. I need to figure out how to emulate my apache server so I don't have to test that code directly on the server. Then I could start writing and testing applications that stream data between the browser and server, which is cool.
It might come to that, but I'm a wimp. The eclipse might have an internal plugin that could work with it's "local server" it's been using to test my js & html stuff.
I have not yet googled anything on this, because I'm still becoming friends with Javascript. After I am, I'll start working on blending server-side CGI with browser-side Javascript. At least that's the current plan.
edit:
Again, I'm going to learn Javascript before I push to blending it with Python. But here's a diagram with what I have in mind:
Diagram1.png (17.87 KiB) Viewed 1810 times
Made with Dia, the open source diagram application.
Yeah, document.write() is icky. Remember, jQuery is your friend.
There are at least two ways in which server-side python and client-side Javascript can interact. One is that python can write Javascript in a metaprogramming sense. Another is that Javascript can query server-side python via AJAX.