...

View Full Version : document.writeln Question?



kazerk
06-19-2009, 07:56 PM
Hi all, new to forum. Does anyone know if its possible to use the javascript document.writeln function to write in an image into a certain portion of a web page based on where the window position is. In other words if the browser window is scrolled half way down the page, Javascript would write the image once the scroll reaches a certain point.

Any help or direction would be much appreciated.

:thumbsup:

Fou-Lu
06-19-2009, 09:33 PM
Yes it is. The guys in the javascript forum can show you how to do that. This can also be done with fixed positioning if I understand what you're looking for.

Java is not the same as Javascript (and not really similar), despite the similar names. Moving from Java forum to Javascript.

kazerk
06-19-2009, 10:04 PM
Thank you...

Philip M
06-20-2009, 07:20 AM
No, it isn't. document.write or writeln statements must be run before the page finishes loading. Any document.write statement that runs after the page finishes loading will create a new page and overwrite all of the content of the current page. So document.write is at best really only useful to write the original content of your page. It cannot be used to update the content of your page after that page has loaded.


A child of five would understand this. Send someone to fetch a child of five.
Groucho Marx



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum