Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #17806 > unrolled thread
| Started by | cato.salid@getmail.no |
|---|---|
| First post | 2012-12-23 02:17 -0800 |
| Last post | 2013-01-05 17:36 -0800 |
| Articles | 12 — 5 participants |
Back to article view | Back to comp.lang.javascript
Strange - Chrome doesn't run the script if an empty button is remove cato.salid@getmail.no - 2012-12-23 02:17 -0800
Re: Strange - Chrome doesn't run the script if an empty button is remove 123Jim <jnkjnjnini@uhnuhnunuhnuy.invalid> - 2012-12-23 12:13 +0000
Re: Strange - Chrome doesn't run the script if an empty button is remove cato.salid@getmail.no - 2012-12-23 04:47 -0800
Re: Strange - Chrome doesn't run the script if an empty button is remove 123Jim <jnkjnjnini@uhnuhnunuhnuy.invalid> - 2012-12-23 13:41 +0000
Re: Strange - Chrome doesn't run the script if an empty button is remove cato.salid@getmail.no - 2012-12-23 05:46 -0800
Re: Strange - Chrome doesn't run the script if an empty button is remove Stefan Weiss <krewecherl@gmail.com> - 2012-12-23 14:44 +0100
Re: Strange - Chrome doesn't run the script if an empty button is remove cato.salid@getmail.no - 2012-12-23 06:03 -0800
Re: Strange - Chrome doesn't run the script if an empty button is remove cato.salid@getmail.no - 2012-12-23 06:54 -0800
Re: Strange - Chrome doesn't run the script if an empty button is remove "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-12-23 18:19 +0100
Re: Strange - Chrome doesn't run the script if an empty button is remove 123Jim <jnkjnjnini@uhnuhnunuhnuy.invalid> - 2012-12-23 17:19 +0000
Re: Strange - Chrome doesn't run the script if an empty button is remove cato.salid@getmail.no - 2012-12-24 06:14 -0800
Re: Strange - Chrome doesn't run the script if an empty button is remove David Mark <dmark.cinsoft@gmail.com> - 2013-01-05 17:36 -0800
| From | cato.salid@getmail.no |
|---|---|
| Date | 2012-12-23 02:17 -0800 |
| Subject | Strange - Chrome doesn't run the script if an empty button is remove |
| Message-ID | <2ec7220f-818a-42cb-b767-84d5ae59e8cc@googlegroups.com> |
I'm new to javascript and have problem to find why Chrome doesn't run the script if an empty button tag is removed. The script use Windows Media player and lyric lines are displayed using opacity. Any ideas why this happen? http://www.cicyzone.com/Lyrictest/Samples/jsonandopacity.htm Cato
[toc] | [next] | [standalone]
| From | 123Jim <jnkjnjnini@uhnuhnunuhnuy.invalid> |
|---|---|
| Date | 2012-12-23 12:13 +0000 |
| Message-ID | <kb6sh9$1bk$1@dont-email.me> |
| In reply to | #17806 |
On 23/12/2012 10:17, cato.salid@getmail.no wrote:
> I'm new to javascript and have problem to find why Chrome
> doesn't run the script if an empty button tag is removed.
> The script use Windows Media player and lyric lines are displayed using opacity.
> Any ideas why this happen?
>
> http://www.cicyzone.com/Lyrictest/Samples/jsonandopacity.htm
>
> Cato
>
Chrome settings button (right side) > tools > 'javascript console'
reports: "Uncaught TypeError: Cannot read property 'currentPosition' of
undefined"
In jsonandopacity.htm
here:
function synctimer()
{
var tim=Math.round(lyricplayer.controls.currentPosition*1000/100) * 100 ;
[toc] | [prev] | [next] | [standalone]
| From | cato.salid@getmail.no |
|---|---|
| Date | 2012-12-23 04:47 -0800 |
| Message-ID | <4904e075-1d08-47c1-a6f4-ca49d5d35b7b@googlegroups.com> |
| In reply to | #17807 |
On Sunday, December 23, 2012 1:13:19 PM UTC+1, 123Jim wrote:
> On 23/12/2012 10:17, cato.salid@getmail.no wrote:
>
> > I'm new to javascript and have problem to find why Chrome
>
> > doesn't run the script if an empty button tag is removed.
>
> > The script use Windows Media player and lyric lines are displayed using opacity.
>
> > Any ideas why this happen?
>
> >
>
> > http://www.cicyzone.com/Lyrictest/Samples/jsonandopacity.htm
>
> >
>
> > Cato
>
> >
>
>
>
> Chrome settings button (right side) > tools > 'javascript console'
>
> reports: "Uncaught TypeError: Cannot read property 'currentPosition' of
>
> undefined"
>
>
>
> In jsonandopacity.htm
>
> here:
>
> function synctimer()
>
> {
>
> var tim=Math.round(lyricplayer.controls.currentPosition*1000/100) * 100 ;
Thank you for your answer, but why doesn't I get this error in the console.
And why are this working for me when the button is present, and not when removed. (You must also have Windows Media player plugin for Firefox and Chrome)
This script works in FireFox and IE with or without the button.
Cato
[toc] | [prev] | [next] | [standalone]
| From | 123Jim <jnkjnjnini@uhnuhnunuhnuy.invalid> |
|---|---|
| Date | 2012-12-23 13:41 +0000 |
| Message-ID | <kb71m9$smd$1@dont-email.me> |
| In reply to | #17808 |
On 23/12/2012 12:47, cato.salid@getmail.no wrote:
> On Sunday, December 23, 2012 1:13:19 PM UTC+1, 123Jim wrote:
>> On 23/12/2012 10:17, cato.salid@getmail.no wrote:
>>
>>> I'm new to javascript and have problem to find why Chrome
>>
>>> doesn't run the script if an empty button tag is removed.
>>
>>> The script use Windows Media player and lyric lines are displayed using opacity.
>>
>>> Any ideas why this happen?
>>
>>>
>>
>>> http://www.cicyzone.com/Lyrictest/Samples/jsonandopacity.htm
>>
>>>
>>
>>> Cato
>>
>>>
>>
>>
>>
>> Chrome settings button (right side) > tools > 'javascript console'
>>
>> reports: "Uncaught TypeError: Cannot read property 'currentPosition' of
>>
>> undefined"
>>
>>
>>
>> In jsonandopacity.htm
>>
>> here:
>>
>> function synctimer()
>>
>> {
>>
>> var tim=Math.round(lyricplayer.controls.currentPosition*1000/100) * 100 ;
>
> Thank you for your answer, but why doesn't I get this error in the console.
> And why are this working for me when the button is present, and not when removed. (You must also have Windows Media player plugin for Firefox and Chrome)
> This script works in FireFox and IE with or without the button.
>
> Cato
>
Did you change something? .. It is working now also in chrome since I
updated the windows media player plugin.
[toc] | [prev] | [next] | [standalone]
| From | cato.salid@getmail.no |
|---|---|
| Date | 2012-12-23 05:46 -0800 |
| Message-ID | <83246118-0104-4877-90c7-967a4f7c521d@googlegroups.com> |
| In reply to | #17809 |
No, nothing is changed. I tested over and over again, before I found that this script worked in Chrome if I added a empty button.
[toc] | [prev] | [next] | [standalone]
| From | Stefan Weiss <krewecherl@gmail.com> |
|---|---|
| Date | 2012-12-23 14:44 +0100 |
| Message-ID | <kb71rh$6js$1@news.albasani.net> |
| In reply to | #17808 |
On 2012-12-23 13:47, cato.salid@getmail.no wrote: > On Sunday, December 23, 2012 1:13:19 PM UTC+1, 123Jim wrote: >> "Uncaught TypeError: Cannot read property 'currentPosition' of >> undefined" ... > Thank you for your answer, but why doesn't I get this error in the > console. And why are this working for me when the button is present, > and not when removed. (You must also have Windows Media player plugin > for Firefox and Chrome) > This script works in FireFox and IE with or without the button. I can't even begin to guess. Your document isn't valid HTML or XHTML, so what happens when you add or remove parts is up to the browser. You should: 1) add a DOCTYPE 2) validate your HTML and eliminate errors 3) confirm that your document is rendered in strict mode instead of quirks mode 4) fix the broken <-- --> comment 5) don't refer to a "lyricsplayer" variable if you haven't defined one. You should probably also add a fallback or at least an error message for visitors without WMP or the WMP plugin. A lot of people don't have this installed; for some (like me) it's not even available on our platform. The way it runs now, we just get the JS error message 123Jim posted (because lyricplayer.controls is undefined). - stefan
[toc] | [prev] | [next] | [standalone]
| From | cato.salid@getmail.no |
|---|---|
| Date | 2012-12-23 06:03 -0800 |
| Message-ID | <78e03363-ea43-4ca4-af97-63c5b48f2e67@googlegroups.com> |
| In reply to | #17810 |
Thank you Stefan, I will remove or fix the comment. IE also had some strange behaivor for alpha filter to work. Had to set the element width to 100% before alpha filter worked. The scripts I write are normaly for use in Stationery groups using OE,WM and WLM, but some want to use these for normal pages, so I wanted to give it a try. Cato
[toc] | [prev] | [next] | [standalone]
| From | cato.salid@getmail.no |
|---|---|
| Date | 2012-12-23 06:54 -0800 |
| Message-ID | <2a590ac6-feb1-49e0-9993-fba4fc083495@googlegroups.com> |
| In reply to | #17812 |
Replaced button with a div element and it looks like this works. But I couldn't add a class to the element or give the div a id name, if I did then the script stopped. I haven't any ideas why this happen. Cato
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2012-12-23 18:19 +0100 |
| Message-ID | <XnsA132BA763965eejj99@194.109.133.133> |
| In reply to | #17813 |
wrote on 23 dec 2012 in comp.lang.javascript: > Replaced button with a div element and it looks like this works. > But I couldn't add a class to the element or give the div a id name, > if I did then the script stopped. I haven't any ideas why this happen. > > Cato This is not email but usenet. Please quote what you are responding on, or respond privately with email. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | 123Jim <jnkjnjnini@uhnuhnunuhnuy.invalid> |
|---|---|
| Date | 2012-12-23 17:19 +0000 |
| Message-ID | <kb7eft$47s$1@dont-email.me> |
| In reply to | #17812 |
On 23/12/2012 14:03, cato.salid@getmail.no wrote: > Thank you Stefan, > I will remove or fix the comment. > IE also had some strange behaivor for alpha filter to work. > Had to set the element width to 100% before alpha filter worked. > The scripts I write are normaly for use in Stationery groups using OE,WM and WLM, > but some want to use these for normal pages, so I wanted to give it a try. > > Cato > Further to Stefan's suggestions check for errors here: http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.cicyzone.com%2FLyrictest%2FSamples%2Fjsonandopacity.htm
[toc] | [prev] | [next] | [standalone]
| From | cato.salid@getmail.no |
|---|---|
| Date | 2012-12-24 06:14 -0800 |
| Message-ID | <af2c9b8c-2693-41ae-a495-10574923b9bc@googlegroups.com> |
| In reply to | #17815 |
thank you for all suggestions. I have a lot to take in when I look at all these errors. I added more to the script now so I will get a lot more errors now. http://www.cicyzone.com/Lyrictest/Samples/crossbrowsertry.htm Cato
[toc] | [prev] | [next] | [standalone]
| From | David Mark <dmark.cinsoft@gmail.com> |
|---|---|
| Date | 2013-01-05 17:36 -0800 |
| Message-ID | <10207175-1093-4cb1-8c6e-e01387d20022@z8g2000yqo.googlegroups.com> |
| In reply to | #17812 |
On Dec 23 2012, 9:03 am, cato.sa...@getmail.no wrote: > Thank you Stefan, > I will remove or fix the comment. > IE also had some strange behaivor for alpha filter to work. > Had to set the element width to 100% before alpha filter worked. Not strange at all as that sets the internal "hasLayout" flag for the element. The proprietary zoom:1 does the same thing. If that flag is not set, DirectX filters have no effect.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web