General Question

stephen's avatar

The png looks bad in IE7 after I change its opacity with javascript?

Asked by stephen (351points) June 16th, 2008

these day i m working on a web app, and i want to design a control panel in it, when i press mouse down on this panel the javascript codes change its opacity(opacity=70,and i can drag it),and when the mouse up it return back to the normal status(opacity=100),
var e=e||window.event;
$(drago).style.filter=“alpha(opacity=”+70+”)”; //ie7 sucks

var e=e||window.event;
theres some pics that show u the detail of this problem:
heres the panel’s normal state:

mousedown in firefox,this is what i want:

but this is what happens in ie7,the black border appears(but i didnt set the “border” attribute in css and js),its sucks:

and mouseup in firefox,return back to the normal staus,looks good:

mouseup in ie7, the black border still exist:

is this ie7 bug? why and how? thanx

Observing members: 0 Composing members: 0

7 Answers

Breefield's avatar

You might like Mootools.
It makes stuff like this a snap!

stephen's avatar

@breefield, yeah i know that javascript framework, but now i just wanna know what the problem is.

Breefield's avatar

But if you just ignore the problem you could have the thing working in 5 min with Mootools :p

stephen's avatar

Ignoring, Top suggestion! !

andthere's avatar

@stephen: hey.. were you able to solve your problem?
i am having the same issue when i try to modify the opacity.

Breefield's avatar

Just try setting the opacity like this, without the filter.


Answer this question




to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
Knowledge Networking @ Fluther