How to print text on a SPECIFIC location, document.write

JavaScript and client side scripting.

Moderator: General Moderators

pilau
Forum Regular
Posts: 594
Joined: Sat Jul 09, 2005 10:22 am
Location: Israel

Post by pilau »

Roger that.
And why exactly is it better than Saibot's code?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

pilau wrote:Roger that.
And why exactly is it better than Saibot's code?
There's magnitute of reasons to consider this solution 'better'... one would be that your user-agent doesn't need to parse the snippet you're pasting into your document tree.
pilau
Forum Regular
Posts: 594
Joined: Sat Jul 09, 2005 10:22 am
Location: Israel

Post by pilau »

Hmm, a bit of problem with your solution, because it appends the child every time the cursor moves, which creates something like that: 543,543394,394354,354286,286313,313479,479450,450768,768768,768316,316659,659233,233

Not nice.
How can I only create a text node?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

...huh? cursor? what cursor?

Did you mean you wanted to replace the content of specific DOM node?
pilau
Forum Regular
Posts: 594
Joined: Sat Jul 09, 2005 10:22 am
Location: Israel

Post by pilau »

Well I'm using the onmousemove event to present the cursor coordinates, and I wanted to present them in a specific place.
Post Reply