i'm building a webpage using CSS and javascript to produce special effects. i use onmouseover, onmouseout, and onclick events inside a table's cells to change their cssclasses.
everything was going perfect so far, as i'm using VS 2008 BETA2, with the default browser IE 7.0
so now when i try to open my page in either firefox or safari, it's all messed up! the links do not work anymore - i.e. the onclick event is not firing - and the images' fading effects are not taking place!
my question is: is it that difficult to produce a javascript page that works across different browsers?
is there some code i'm missing for my events? i'm feeling totally confused as my code should work!
i'm thankful to any replies.
yasser.
yasserstein
0
Newbie Poster
Recommended Answers
Jump to PostDeveloping in IE is your first mistake. Develop in Firefox and then test in IE. Much less work to do to make it compatible.
Post your code so we can see if there is any proprietary code in their (which Microsoft likes to do).
Jump to PostIE does it differently than Firefox.
You are using an IE proprietary opacity filter.
Mozilla (Firefox) already uses the CSS3 opacity element.
Neither method works on the other browser.
Jump to Posttry something like this:
object.filters.alpha.opacity+=direction*delta; object.style.MozOpacity+=direction*delta;
+ other additions where neccessary; [object].style.MozOpacity is the JS property though.
Also, for style attributes it's not usually advisable to work incrementally (i.e. += x )... it will probably be ok in this case, to be honest, but I try …
All 10 Replies
stymiee
111
He's No Good To Me Dead
Team Colleague
yasserstein
0
Newbie Poster
MidiMagic
579
Nearly a Senior Poster
yasserstein
0
Newbie Poster
MattEvans
473
Veteran Poster
Team Colleague
Featured Poster
yasserstein
0
Newbie Poster
MattEvans
473
Veteran Poster
Team Colleague
Featured Poster
yasserstein
0
Newbie Poster
MattEvans
473
Veteran Poster
Team Colleague
Featured Poster
yasserstein
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.