469,936 Members | 2,444 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,936 developers. It's quick & easy.

opacity

Hey all,

I'm animating a menu by changing its opacity (with javascript) from 0 to 100
in steps of 10 at 10ms intervals. It works perfectly the first time, the
problem is that after it's done it once it doesn't work again. I've checked
and the loop is definatly working, the values are definatly being set etc, I
see no reason why it stops working after the first time. Any ideas?

code is at http://www.photash.com/menu.html (currently MSIE only)

Phil
Jul 21 '05 #1
27 4408
"Phillip Parr" <no@no.com> wrote:
(with javascript) Any ideas?
Don't crosspost js questions to a stylesheet newsgroup.
(currently MSIE only)


Note the "www" in this group's name, we author for the web.

--
Spartanicus
Jul 21 '05 #2
Phillip Parr wrote:
I'm animating a menu by changing its opacity (with javascript) from 0 to 100
in steps of 10 at 10ms intervals. It works perfectly the first time, the
problem is that after it's done it once it doesn't work again. I've checked
and the loop is definatly working, the values are definatly being set etc, I
see no reason why it stops working after the first time. Any ideas?


I don't know what causes IE to not animate it the second time. However,
adding an additional
document.getElementById(animate).style.filter="alp ha(opacity=100)";

in your fadeIn function, might be a workaround:

function fadeIn()
{
if(!opacityx) {
anitimer=setInterval("fadeIn();",10);
document.getElementById(animate).style.filter="alp ha(opacity=100)";
}
...
}

Daniel
Jul 21 '05 #3
opacity is a css element, for all i knew it could have been a css problem.
"Spartanicus" <me@privacy.net> wrote in message
news:78********************************@news.spart anicus.utvinternet.ie...
"Phillip Parr" <no@no.com> wrote:
(with javascript)

Any ideas?


Don't crosspost js questions to a stylesheet newsgroup.
(currently MSIE only)


Note the "www" in this group's name, we author for the web.

--
Spartanicus

Jul 21 '05 #4
Top posting is not appreciated here, snipping quotes is. Corrected this
once.

"Phillip Parr" <no@no.com> wrote:
(with javascript)
Any ideas?


Don't crosspost js questions to a stylesheet newsgroup.
(currently MSIE only)


Note the "www" in this group's name, we author for the web.

opacity is a css element


Proposed for CSS3, not working in any browser.

--
Spartanicus
Jul 21 '05 #5
*Spartanicus* <me@privacy.net>:
"Phillip Parr" <no@no.com> wrote:
opacity is a css element


Proposed for CSS3, not working in any browser.


At least not under that name, i.e. without a vendor prefix.

--
Ociffer, I swear to drunk, I'm not God!
Jul 21 '05 #6

"Phillip Parr" <no@no.com> wrote in message
news:co**********@sparta.btinternet.com...

"Spartanicus" <me@privacy.net> wrote in message
news:78********************************@news.spart anicus.utvinternet.ie...
"Phillip Parr" <no@no.com> wrote:
(with javascript)
Any ideas?


Don't crosspost js questions to a stylesheet newsgroup.
(currently MSIE only)


Note the "www" in this group's name, we author for the web.

opacity is a css element, for all i knew it could have been a css problem.


You're using the "filter" property, which is not a CSS property. It's a
Microsoft extension.

Jul 21 '05 #7
On Wed, 1 Dec 2004 13:16:44 +0000 (UTC), Phillip Parr <no@no.com> wrote:
opacity is a css element, for all i knew it could have been a css
problem.

1) No elements in CSS> I assume you meant to say "property".

2) http://www.w3.org/TR/CSS21/propidx.html - no such property. It's
apparently a proprietory property, not properly valid CSS.
Jul 21 '05 #8

"Spartanicus" <me@privacy.net> wrote in message
news:vo********************************@news.spart anicus.utvinternet.ie...
Top posting is not appreciated here, snipping quotes is. Corrected this
once.

"Phillip Parr" <no@no.com> wrote:
(with javascript)

Any ideas?

Don't crosspost js questions to a stylesheet newsgroup.

(currently MSIE only)

Note the "www" in this group's name, we author for the web.

opacity is a css element


Proposed for CSS3, not working in any browser.

--
Spartanicus


You lot are pretty harsh to people who don't know your little set of
'rules'.
Jul 21 '05 #9
Thanks for your help, it wasn't quite the solution but using the same logic
I removed the section of code where i explicitly set the opacity to 0 and
that worked great. You're also the only person that tried to help, the
people from the css place are really, VERY snooty!

Phil

"Daniel Kirsch" <Iw*****************@gmx.de> wrote in message
news:co*************@news.t-online.com...
Phillip Parr wrote:
I'm animating a menu by changing its opacity (with javascript) from 0 to
100 in steps of 10 at 10ms intervals. It works perfectly the first time,
the problem is that after it's done it once it doesn't work again. I've
checked and the loop is definatly working, the values are definatly being
set etc, I see no reason why it stops working after the first time. Any
ideas?


I don't know what causes IE to not animate it the second time. However,
adding an additional
document.getElementById(animate).style.filter="alp ha(opacity=100)";

in your fadeIn function, might be a workaround:

function fadeIn()
{
if(!opacityx) {
anitimer=setInterval("fadeIn();",10);
document.getElementById(animate).style.filter="alp ha(opacity=100)";
}
...
}

Daniel

Jul 21 '05 #10
Phillip Parr wrote:
You lot are pretty harsh to people who don't know your little set of
'rules'.


I'd say deal with it, and don't take it personally. This group is a
bunch of normal people with an above-average knowledge of CSS. The
easiest questions to answer are those which follow our little set of
rules, which apply across most technical newsgroups.

Learn from the experience - we all have - and you'll find a better
response to future questions. But yes, as a bunch of closet geeks, we
can be fairly terse at times when asked to answer questions on
IE-specific Javascript...

Welcome!

--
Mark.
http://tranchant.plus.com/
Jul 21 '05 #11
Phillip Parr wrote:
Thanks for your help, it wasn't quite the solution but using the same logic
I removed the section of code where i explicitly set the opacity to 0 and
that worked great. You're also the only person that tried to help, the
people from the css place are really, VERY snooty!


Because it wasn't a CSS question. See my response in ciwas about snootiness.

PS you top-posted again... ;-)

--
Mark.
http://tranchant.plus.com/
Jul 21 '05 #12
Phillip Parr wrote:
"Spartanicus" wrote ...
Top posting is not appreciated here, snipping quotes is. Corrected
this once.

You lot are pretty harsh to people who don't know your little set of
'rules'.


That we are. You'd do well to learn those rules if you want help. If you
don't want help, then you needn't follow them.

HTH.

--
Brian (remove "invalid" to email me)
Jul 21 '05 #13
This I understand, but firstly it was technically a css issue, as it was to
do with css styles, the fact that I was using IE specific opacity is neither
here nor there, I like to get code working in one browser before I make it
work in others too.
Secondly It'd be nice to be told the rules, rather than have them ranted at
me like some nerdy 15 year old spot machine was trying to offend me!
"Brian" <us*****@julietremblay.com.invalid> wrote in message
news:Hv**********************@bgtnsc04-news.ops.worldnet.att.net...
Phillip Parr wrote:
"Spartanicus" wrote ...
Top posting is not appreciated here, snipping quotes is. Corrected
this once.

You lot are pretty harsh to people who don't know your little set of
'rules'.


That we are. You'd do well to learn those rules if you want help. If you
don't want help, then you needn't follow them.

HTH.

--
Brian (remove "invalid" to email me)

Jul 21 '05 #14
"Mark Tranchant" <ma**@tranchant.plus.com> wrote in message
news:41**********************@ptn-nntp-reader02.plus.net...
Phillip Parr wrote:
Thanks for your help, it wasn't quite the solution but using the same
logic I removed the section of code where i explicitly set the opacity to
0 and that worked great. You're also the only person that tried to help,
the people from the css place are really, VERY snooty!


Because it wasn't a CSS question. See my response in ciwas about
snootiness.

PS you top-posted again... ;-)

--
Mark.
http://tranchant.plus.com/


Sorry, it's hard to not top post. I've been doing it with emails all my
life, it's hard to suddenly change. And why isn't it a css issue? It's part
of the styles isn't it?
Jul 21 '05 #15
This I understand, but firstly it was technically a css issue, as it was
to
do with css styles, the fact that I was using IE specific opacity is
neither here nor there, I like to get code working in one browser before I
make it work in others too.
Secondly It'd be nice to be told the rules, rather than have them ranted
at me like some nerdy 15 year old spot machine was trying to offend me!

Oh, and before you rant again, I'm sorry for the top post!

"Brian" <us*****@julietremblay.com.invalid> wrote in message
news:Hv**********************@bgtnsc04-news.ops.worldnet.att.net...
Phillip Parr wrote:
"Spartanicus" wrote ...

Top posting is not appreciated here, snipping quotes is. Corrected
this once.

You lot are pretty harsh to people who don't know your little set of
'rules'.


That we are. You'd do well to learn those rules if you want help. If you
don't want help, then you needn't follow them.

HTH.

--
Brian (remove "invalid" to email me)


Jul 21 '05 #16
Phillip Parr wrote:
And why isn't it a css issue? It's part
of the styles isn't it?


Yes, it's part of the styles. But that part does work. The dynamic
change is done with JavaScript and that's where the problem occured.

Daniel
Jul 21 '05 #17
"Daniel Kirsch" <Iw*****************@gmx.de> wrote in message
news:co*************@news.t-online.com...
Phillip Parr wrote:
And why isn't it a css issue? It's part of the styles isn't it?


Yes, it's part of the styles. But that part does work. The dynamic change
is done with JavaScript and that's where the problem occured.

Daniel


Yes, but I didn't know that, I thought it may have been a general problem
with the css part of it, which is why I asked in both. :)

Phil
Jul 21 '05 #18
Phillip Parr wrote on 02 dec 2004 in comp.lang.javascript:
Sorry, it's hard to not top post. I've been doing it with emails ..
This is NOT email, Philip, but usenet posting.
...all my life, it's hard to suddenly change.


You must be very young.

Evertjan.
Jul 21 '05 #19
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn*******************@194.109.133.29...
Phillip Parr wrote on 02 dec 2004 in comp.lang.javascript:
Sorry, it's hard to not top post. I've been doing it with emails ..
This is NOT email, Philip, but usenet posting.


Really? I'd never have guessed! And what i meant by emails were: my news
reader positions me at the top of a news post when i reply, the same as an
email does
...all my life, it's hard to suddenly change.
You must be very young.


I am, I'm only 22. email has been around since the 70's, so what can I say?

Evertjan.

Jul 21 '05 #20
Phillip Parr wrote on 02 dec 2004 in comp.lang.javascript:
This is NOT email, Philip, but usenet posting.
Really? I'd never have guessed!


A good thing I told you, ain't it?
And what i meant by emails were: my news reader
positions me at the top of a news post when i reply, the
same as an email does


That is a strange way to define the word "email".

Evertjan.
Jul 21 '05 #21
"Phillip Parr" <no@no.com> wrote:
Really? I'd never have guessed! And what i meant by emails were: my news
reader positions me at the top of a news post when i reply, the same as an
email does


So that you can remove irrelevant parts and reply directly below the
respective relevant statement as you move down the posting you are
answering to. As with emails. Actually quite useful, isn't it?

Bye,
Martin
Jul 21 '05 #22
> Bye,
Martin


Yes, I guess it is.
Jul 21 '05 #23
On Thu, 2 Dec 2004 23:00:04 +0000 (UTC) "Phillip Parr"
used 6 lines of text to write in newsgroup:
comp.infosystems.www.authoring.stylesheets
Bye,
Martin


Yes, I guess it is.


You can fix MSOLE top-posting and quoting errors with this:
http://home.cs.tum.edu/~jain/software/oe-quotefix/
--
-Graham

Remove the 'snails' from my email
Jul 21 '05 #24
in comp.infosystems.www.authoring.stylesheets, Phillip Parr wrote:
Oh, and before you rant again, I'm sorry for the top post!


Too late.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Jul 21 '05 #25
G. Morgan wrote:
You can fix MSOLE top-posting and quoting errors with this:
http://home.cs.tum.edu/~jain/software/oe-quotefix/


Yet be sure to snip the unneeded text - many users of Quotefix think all
the thinking's being done for them...
Jul 21 '05 #26
On Thu, 02 Dec 2004 18:48:18 -0500 "Neal"
used 7 lines of text to write in newsgroup:
comp.infosystems.www.authoring.stylesheets
G. Morgan wrote:
You can fix MSOLE top-posting and quoting errors with this:
http://home.cs.tum.edu/~jain/software/oe-quotefix/


Yet be sure to snip the unneeded text - many users of Quotefix think all
the thinking's being done for them...


lol. That's why they use MSOLE to begin with.


--
-Graham

Remove the 'snails' from my email
Jul 21 '05 #27
> You can fix MSOLE top-posting and quoting errors with this:
http://home.cs.tum.edu/~jain/software/oe-quotefix/


Now that's a good idea, thanks!
Jul 21 '05 #28

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Dean Edwards | last post: by
6 posts views Thread by Robert A. Boudra | last post: by
1 post views Thread by mhoeneveld | last post: by
2 posts views Thread by reidarT | last post: by
16 posts views Thread by Darko | last post: by
15 posts views Thread by Sunny | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.