how to detect that browser is going to issue a write command
lily ling
Greenhorn
Joined: Dec 03, 2001
Posts: 25
posted
0
Hi, there
I know we can use document.write() to print any contents on page but how to know that browser is going to use this command before/while it starts to do printing. Is there any way to detect that what command browser is going to execute ?
Thank you very much, any advice is highly appreciated.
Lily
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
6
posted
0
document.write happensa s the page is being rendered? I am not sure what you are trying to do.
Eric
lily ling
Greenhorn
Joined: Dec 03, 2001
Posts: 25
posted
0
I would like to know if we can capture document.write() command that browser is going to execute to print the page so I can add some other logic.
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
6
posted
0
unless you can write an if statement around it, then no....
Yuriy Fuksenko
Ranch Hand
Joined: Feb 02, 2001
Posts: 413
posted
0
Not sure what are you trying todo... Have you tried something like:
So, whenever the page will try to call document.write (after your function definition, so put it at the begining of the page), your code will be called.
lily ling
Greenhorn
Joined: Dec 03, 2001
Posts: 25
posted
0
thank you very much, Eric.
Lily
lily ling
Greenhorn
Joined: Dec 03, 2001
Posts: 25
posted
0
And thanks to Yuriy. I will try that out.
Lily
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: how to detect that browser is going to issue a write command