document.body.insertAdjacentHTML - need firefox alternative!

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
AustinBrock
Posts: 7
Joined: August 9th, 2006, 6:04 am

Post by AustinBrock »

LOl, well i did those things, and errmm... seems to be no errors now, just... nothing shows LOL

Thankyou though np, I appreciate this very much.
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

Yeah, it works. The box shows up at the bottom. I just haven't told you how to include the styling yet (one thing at a time...)

Include this after where you're setting the ID attribute

Code: Select all

div.style.top = top_pos;
div.style.left = left_pos;
div.style.position = "absolute";

I'm assuming your top_pos and left_pos are correct.
AustinBrock
Posts: 7
Joined: August 9th, 2006, 6:04 am

Post by AustinBrock »

Thanks np, works a charm in IE, but still displaying at the bottom in Firefox.

http://www.hoverrace.com/tracks/index.p ... wse&type=5

Oh, and it doesn't like the use of ' in a file name either : /. Using php to addslashes only made the link break, and without it is just gives an error.

http://www.hoverrace.com/tracks/index.p ... &offset=20

You can see that on 426Hemi's Race[1-261].
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

The problem is now in this code:

Code: Select all

if (window.event) XY(event);

window.event is IE-only, so X and Y never get set. Change that code everywhere to be just

Code: Select all

XY(event);

and it should work fine.

I hope all this is teaching you the dangers of those free JavaScript sites...
AustinBrock
Posts: 7
Joined: August 9th, 2006, 6:04 am

Post by AustinBrock »

Thankyou SO SO MUCH np, its working great :D! I owe you big time :D!!!

http://www.hoverrace.com/bb/viewtopic.php?p=3740#3740
Post Reply