Open GoogleCodeExporter opened 9 years ago
I'd recommend either hard-coding your applet tags, or using some tricks to
prevent your page from getting wiped out.
Here's how we are doing it in 1.9
https://github.com/qzind/qz-print/blob/1.9/sample.html#L172
Original comment by tres.fin...@gmail.com
on 25 Jun 2015 at 1:14
Hi,
Thanks for your prompt response.
Can you please explain how hard-coding the applet tag will help. Like I said
the applet is still there, and that's all I can see in the page, the rest of
the HTML is gone.
Original comment by baha...@gmail.com
on 30 Jun 2015 at 5:31
> Can you please explain how hard-coding the applet tag will help.
deployJava uses the JavaScript function "document.write" which wipes out the
page contents. Per Oracle, it is only intended to be at the top of a page.
This means if it is called after page load it will wipe our your entire page.
More here:
http://stackoverflow.com/questions/13517790/using-deployjava-runapplet-to-target
-specific-element
-Tres
Original comment by tres.fin...@gmail.com
on 30 Jun 2015 at 5:34
Thanks Tres for the link. Much appreciated.
The following code for the link worked for me:
function docWriteWrapper(func) {
var writeTo = document.createElement('del'),
oldwrite = document.write,
content = '';
writeTo.id = "me";
document.write = function(text) {
content += text;
}
func();
writeTo.innerHTML += content;
document.write = oldwrite;
document.body.appendChild(writeTo);
}
An then:
docWriteWrapper(function () {
deployJava.runApplet(attributes, parameters, "1.6");
});
Original comment by baha...@gmail.com
on 2 Jul 2015 at 5:27
Original issue reported on code.google.com by
baha...@gmail.com
on 25 Jun 2015 at 1:01