Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

createElement with predefined CSS in IE6 & IE7

Status
Not open for further replies.

PhoenixD

Programmer
Aug 19, 2007
21
US
I am creating balloons (or tooltips), but calling them bubbles.

It works perfectly in Firefox, and I have it almost working in IE7, but IE6 is just plain not showing anything.

I am creating a div and all of its content (by creating a div and then assigning it innerHTML)

The div I assign a class, which is defined in a stylesheet that's getting included on the page. I know this is where IE7 err's because if I use javascript to set all the properties of the div manually, IE7 gets much closer to working and with more fiddling I could fix it.

IE6, however, is still blank and I'm quite clueless.

You can see my test page at
I'm not including any code as I'm not getting any errors... and I feel no need to bombard you with all the javascript, css and source of the page.

Thanks!

-Kerry
 
PhoenixD said:
I'm not including any code as I'm not getting any errors...

Look again.

[tt]Microsoft JScript runtime error: '1' is null or not an object[/tt]

Code:
var href = /#[^?]+\?(.+)/.exec(anchors[i].hash);
[COLOR=red]var arVariables = href[1].split("&");[/color]

You aren't bothering to check if [tt]href[/tt] actually has a 1st value before attempting to do things to it.

Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.

Webflo
 
Thanks - I guess I have a quarky version of IE - doesn't show that error :(

So the difference was the "hash" in IE 6 doesn't include the query string after, as it does in IE7 and FF.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top