Full-screen IE spoof

P

Paul

Try making a .html file with only this inside:

<script>
op=window.createPopup();
op.document.body.innerHTML="">";
op.show(0,0,screen.width,screen.height,document.body);
</script>

As you it will open a full screen, empty browser.
If I try to change the innerHTML="" part to innerHTML="HELLO!"
I will get an empty screen with HELLO! in the top left-hand corner.
My question is why do I get an error if I try and enter anything but
pain text within the innerHTML="" part?

What do I need to do to make it to take more than plain text within
innerHTML=""?

Thanks

Paul
 
N

N Clements

(e-mail address removed) (Paul) wrote in
Try making a .html file with only this inside:

<script>
op=window.createPopup();
op.document.body.innerHTML="">";
op.show(0,0,screen.width,screen.height,document.body);
</script>

As you it will open a full screen, empty browser.
If I try to change the innerHTML="" part to innerHTML="HELLO!"
I will get an empty screen with HELLO! in the top left-hand corner.
My question is why do I get an error if I try and enter anything but
pain text within the innerHTML="" part?

What do I need to do to make it to take more than plain text within
innerHTML=""?

Thanks

Paul

There's an error in your script as shown. Having said that, when I tried
to add a button, I had no problems. Try something like the following:

<script>
str="<br><hr><input type=\"button\" value=\"bye\" onclick=\"alert(
'blah' )\">";

op=window.createPopup();
op.document.body.innerHTML=str;
op.show(0,0,screen.width,screen.height,document.body);
</script>

Although I've not tried it, if you want to add some scripting into the
string, you'll probably need to split up the <script> tags -- "<scr" +
"ipt>".

Hope that helps.

N. Clements
Brainbench MVP for _Javascript
www.brainbench.com
(e-mail address removed).242.mailshell.com
Remove 2nd through 4th spam to reply.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top