473,320 Members | 1,950 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 4509
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dean Edwards | last post by:
I am attempting to change the opacity of an image. I can modify opacity ok: function flip(pic, opacity){ pic.style.filter = 'alpha(opacity='+opacity+')'; } But I'm not familiar with...
0
by: kaeli | last post by:
All, The following is an example of what I'm trying to do: I have a box set to be partially transparent. I want the text in the box to NOT be partially transparent. This works in IE, but NN7 has...
3
by: Marek Mänd | last post by:
This posting will express my concern about the future of css3 forthcoming recommendation. I think for long time now, that the current implementation of CSS attribute opacity is less than usable...
6
by: Robert A. Boudra | last post by:
As you will probably guess, I'm just starting out with VB.net although I'm a long time VB developer. I was playing around with the Opacity property of a form and have found that I can set the...
1
by: mhoeneveld | last post by:
I am writing a small script to fade the opacity of an image/object. The script itself works fine only I do have some unwanted behaviour. I do use a tablecell object and the mouseover/mouseout to...
2
by: reidarT | last post by:
I want a windows form to act like the one in Outlook when you get a new message and it is visible for about a couple of seconds and then the opacity decreases and the form dissapears in the end I...
16
by: Darko | last post by:
Hi, I'm trying to get and set an element's opacity, but I'm stuck with, what a hell of surprise, Internet Explorer. As for getting the element's opacity, I have the following (not working) lines...
15
by: Sunny | last post by:
Hi, I can change the lement opacity in IE using. abc.style.filter = 'alpha(opacity=' + 10 + ')'; But this dont work in firefox, In firefox it throws error. How I can change the opacity of an...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.