Page 1 of 1
Access to the WebGadget's Html propery.
Posted: Sat Jul 12, 2003 1:36 pm
by GedB
It would be great if the text of the WebGadget could be accessed directly, so that HTML could be loaded into the WebGadget without having to save it to file first.
Perhaps an optional paramater could be added to SetWindowText to distinguish between changing the url and the actual text.
Posted: Mon Jul 14, 2003 2:43 pm
by naw
Hi Ged,
Well you can do it by a little known / largely forgotten feature common to both M$ AntiNet Exploiter and Netscape - use embedded JavaScript to write the HTML into the URL....
URL$="javascript: document.write('H<B>el<U>lo Wo</U>rl</B>d'); document.close()"
WebGadget(WGID, x, y, w, h, URL$)
Don't forget to close the document or the Browser will never stop loading...
There's also a bug in IE (there's a surprise) that allows you to code HTML directly into the Browser which is easier than learning JavaScript - but - well it's a bug so perhaps they'll fix it (it's been there since ie3 though AFAIK)
URL$="about: Hel<U>lo Wo</U>rld"
These methods work great for me - use 'em all the time...
Ta - N
Posted: Mon Jul 14, 2003 3:08 pm
by naw
Hi Fred,
Perhaps adding this *trick* into the documentation would be useful ...
Otherwise I guess you would have to separate out the WWW Gadgets Rendering and History/URL functionality into two different Gadgets so they can be set independantly by SetGadgetText().
But then how would you link the Gadget History with the HTML Renderer? Sounds a bit complicated...
Ta - N