I'm experiencing a strange problem with the PB webgadget under Windows 8.
The problem is that it doesn't seem to show elements that were created by the JavaScript createElement() method.
The below HTML file will load perfectly in both IE11 and Google Chrome, but will not load correctly in the web gadget.
Test123.htm:
Code: Select all
<!DOCTYPE html><html><head>
<style type="text/css">
.tst{
position:absolute;
top: 100px;
left: 100px;
width: 500px;
height: 500px;
border:1px solid grey;
overflow:auto;
}
</style>
</head>
<body>
<div id="test" class="tst"></div>
</body>
<script type="text/javascript">
function TestFunc(){
var dv = document.getElementById("test");
var tbl = document.createElement("table");
dv.appendChild(tbl);
for(i=0;i<20;i++){
var rw = document.createElement("row");
tbl.appendChild(rw);
for(j=0;j<100;j++){
var td = document.createElement("td");
rw.appendChild(td);
var txt = document.createTextNode("Test" + j);
td.appendChild(txt);
}
}
}
TestFunc();
</script>
</html>
Code: Select all
If OpenWindow(0, 10,10, 500,500, "Test", #PB_Window_ScreenCentered|#PB_Window_SystemMenu)
WebGadget(1, 0,20,500,480, "")
ButtonGadget(2, 0, 0, 150, 20, "Open")
ButtonGadget(3, 150, 0, 150, 20, "Refresh")
Repeat
ev = WaitWindowEvent()
Select ev
Case #PB_Event_CloseWindow
Break
Case #PB_Event_Gadget
Select EventGadget()
Case 2
fle.s = OpenFileRequester("Open file:", GetCurrentDirectory() + "\Test123.htm", "HTML files (*.htm)|*.htm", 0)
If fle <> ""
SetGadgetText(1, fle)
EndIf
Case 3
SetGadgetState(1, #PB_Web_Refresh)
EndSelect
EndSelect
ForEver
EndIf
Is there anyone who knows where to look for a solution? The available documentation on the webgadget is not very extensive. Also I am surprised to find a difference between the webgadget and IE as they seem to be very much the same thing according the available documentation.
Anyway, advanced thanks for anyone to reply.
Best regards,
Bart