Post by Janet on Sept 11, 2008 9:05:29 GMT -5
This is the stripped down html code
This is the non-working RB code
The time doesn't show in RB. I've read through this discussion: From HTML textarea to RB textarea and I'm guessing it's a matter of Carl's statement
At the end of that discussion is a simple demo using an RB button.
Has the RB button been implemented in RB beta 2?
Can my demo be made to work using this technique?
How would I change the javascript to place the information in a textarea rather than a form?
I'm not intent upon keeping real time. I'd just like to be able to press a button and get the time, but I want to be able to capture that information in a string so I can then parse it and make two times from it (Eastern USA and Central Asia).
Thanks for any help with this.
Janet
<html>
<script type='text/javascript'>
function getGMT() {
date = new Date();
gmt = date.toGMTString();
exp = gmt.substring();
document.formUTC.gmt.value = exp;
setTimeout('getGMT()', 1000);
}
</script>
</head>
<font face='verdana'>
<body onLoad='getGMT();'>
<form name='formUTC'>
<h1>UTC Time</h1>
<br>
UTC (GMT)
<input type='text' size='36' name='gmt'>
<br /><br />
</form>
</body>
</html>
This is the non-working RB code
cls
html "<script type='text/javascript'>
function getGMT() {
date = new Date();
gmt = date.toGMTString();
exp = gmt.substring();
document.formUTC.gmt.value = exp;
setTimeout('getGMT()', 1000);
}
</script>"
html "<font face='verdana'>"
print: print
print "UTC Time Changes"
print: print
html "<form name='formUTC'>"
html " UTC (GMT) "
html "<input type='text' size='42' name='gmt'>"
html "<br /><br />"
html "</form>"
The time doesn't show in RB. I've read through this discussion: From HTML textarea to RB textarea and I'm guessing it's a matter of Carl's statement
Run BASIC does not maintain the contents of widgets that it didn't create. It doesn't even know they are there.
At the end of that discussion is a simple demo using an RB button.
Has the RB button been implemented in RB beta 2?
Can my demo be made to work using this technique?
How would I change the javascript to place the information in a textarea rather than a form?
I'm not intent upon keeping real time. I'd just like to be able to press a button and get the time, but I want to be able to capture that information in a string so I can then parse it and make two times from it (Eastern USA and Central Asia).
Thanks for any help with this.
Janet