11-10-2022, 08:36 PM
I almost wish I was back in the website authoring days again. I've been away from it for about 5 years now, I guess. Anyway, I tried the example code, added a couple of things, and yep, that's what I'm interested in. Use of onclick buttons could control running the code.
Neat how it generates an "image" as a wbpage. The F12 inspect element helps break down the components well enough to see what's going on under the hood. So I tried integrate it a bit with an html doc...
Notes: The nbsp; was required to make the divide property work.
The LINE INPUT statement is a bit buggy. I typed to the edge and it left a letter on the right margin on row down as it went back to begin line-2. Behavior continued. Typed 3 lines, but backspace was only able to go back 1 line.
Pete
Neat how it generates an "image" as a wbpage. The F12 inspect element helps break down the components well enough to see what's going on under the hood. So I tried integrate it a bit with an html doc...
Code: (Select All)
<!DOCTYPE html>
<html>
<head>
<script src="https://google.github.io/wwwbasic/wwwbasic.js"></script>
<style>
body {
background-image: url('golf-scorecard.jpg'); width: 100%;
}
div.fixed {
position: fixed;
top: 356px;
left: 156px;
width: 100%;
}
</style>
</head>
<body>
<div class="fixed">
<script type="text/basic">
PRINT "Hello World!"
COLOR 1, 7
line input "Hello: "; a$
</script>
</div>
</body>
</html>
Notes: The nbsp; was required to make the divide property work.
The LINE INPUT statement is a bit buggy. I typed to the edge and it left a letter on the right margin on row down as it went back to begin line-2. Behavior continued. Typed 3 lines, but backspace was only able to go back 1 line.
Pete