hi,
I have a webview section (with Javascript as the Scripting Language). I have this simple HTML code to change the colors of the page a few times. I have another custom gadget (scripting language python). I was trying to reload the page on a button click. But it just doesn't refresh/reload. Any clues please? Moreover what would be the best way to load html / url in the webview gadget?
Python Custom Gadget Code (Button click does not reload the page)
Code:
import Lianja
class RefButton(Lianja.Commandbutton):
def click(self):
oitem = Lianja.getElementByID("section1")
oitem.reload
mygadget = Lianja.createObject("oGadget", "Gadget")
mygadget.addobject("refbutton", "RefButton")
refbutton.caption = "Refresh"
returnvalue = mygadget
Webview Code (No issues with this)
Code:
<%@ Language=JavaScript %>
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
var intPgColorIndex = 0;
var arrPgColor = new Array("#4048BA", "#E9F23E", "#F73BA9", "#51F73B", "#48F8FB");
var clock;
function StAnim() {
var PgColor;
if (intPgColorIndex >= arrPgColor.length)
{
ClearTimeout(clock);
intPgColorIndex = 0;
}
else
{
PgColor = arrPgColor[intPgColorIndex];
document.body.style.backgroundColor = PgColor;
intPgColorIndex++;
clock=setTimeout("StAnim()",1000);
}
}
</SCRIPT>
</HEAD>
<BODY ONLOAD="StAnim()">
</BODY>
</HTML>
Bookmarks