You can use javascript document.write()
. You can use this command to output string that can be a html element or even a javascript code, or css etc.
Sure that you can try things like that:
document.write("<body><div>a</div></body>");
Then you transform your whole page into that.
Or even can you write in a iFrame
or a Window
, Dialog
...
newWindow = window.open("");
newWindow.document.write("<body><div>a</div></body>");
...
newDialog = window.openDialog("");
newDialog.document.write("<body><div>a</div></body>");
I tried with the iFrame
but i didnt found the write function into it, unhappily. But you can create element using var div = document.createElement("div")
for example and after that you can .appendChild(div)
in the iFrame
easily this way:
var iframe = document.createElement("iframe");
iframe.id = 'iFrame';
var stringElement = "div";
var div = document.createElement(stringElement);
iframe.appendChild(div);
document.body.appendChild(iframe);
You have too window.showModalDialog()
but i dont know how it works kk.