Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opera and the <noscript> tag 3

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,

I've noticed after upgrading to opera 9.6, the noscript tag content is being displayed at the bottom of the page..
I've validated the page to X/HTML 1.0 strict, is this a new bug, or an old one I never noticed before?

Or is it my code?

Cheers
1DMF.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
I'm guessing that JavaScript is off by default in 9.6

What happens if you turn it on?



Greg
People demand freedom of speech as a compensation for the freedom of thought which they seldom use. Kierkegaard
 
My JS works normally in Opera 9.6, but it does show that message on that website. However, playing around with noscript at W3Schools, I have not managed to make Opera show noscript tag again. That website is thus the only website that shows contents of the noscript tag, even though scripts are working.

Do something about world cancer today: Comprehensive cancer control information at PACT
 
Does it make a difference if the noscript tag directly follows the closing script tag?

nope, same problem, very odd!

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Hi

This makes the difference for me in Opera 9.62 :
Code:
noscript {
[red]/*[/red]  display:block; [red]*/[/red]
  width:800px;
  margin:0 auto;
  font-size:.8em;
  text-align:center;
  clear:both;
}

Feherke.
 
lol you're telling me that you have to use CSS on the noscript tag to hide the contents if JavaScript is enabled?



"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Hi

I told nothing.

Just seems that Opera does not like to set the [tt]display[/tt] attribute on an undisplayed [tt]noscript[/tt].

Ok, to tell you something : I see no reason to set the [tt]display: block[/tt] while you put the whole content of the [tt]noscript[/tt] in a [tt]h2[/tt] which is [tt]block[/tt] by default anyway.

Feherke.
 
hmm, better go check out all the other sites and see if I have the same problem.

Do you know if this is a bug specific to 9.6?

cheers,
1DMF.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
i've just tested another site and the noscript isn't showing yet is coded in the same manner.

However on that site the <noscript> tag is straight after the <body> tag, is this perhaps the problem.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Hi

1DMF said:
Do you know if this is a bug specific to 9.6?
Sorry, I can give no details. I just met this problem while debugging your site. Personally I do not use nether Opera or [tt]noscript[/tt] and not following news about evolution of neither of them.

Feherke.
 
No probs.

I found the issue on a few other sites and have made the amendments, I guess i'll just have to look out for it with Opera in future.

I've yet to install Chrome and test with that, why G! had to make things even more complicated and throw another browser into the mix I don't know.

But our stats are starting to show Chrome as a browser being used, so I guess when I get a chance i'll have to do a whole test with Chrome!

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Hi

1DMF said:
why G! had to make things even more complicated and throw another browser into the mix I don't know.
I see nothing bad in having another standard compliant alternative on the market.

Anyway, while Chrome uses the WebKit rendering engine, the same as Safari uses, it renders the documents the same way as Safari renders. At least theoretically... So testing your sites in Safari should be enough.

Feherke.
 
Well all seems ok in Chrome apart from it being the slowest browser i've ever used.

So I guess it's a bug in Opera.

Thanks for the help.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Thought I do have to say that Chrome seems to not suffer from the image display issues with JPEGs that Safari seems to have.

So I guess Safari & Chrome can't be using the same rendering engine can they?

Or is it how it's been tweaked?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Exactly my point about another browser to test in, as all things are not equal in Chrome vs Safari.

Hey ho, onwards and upwards :)

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
well feherke, you were spot on!

Why putting display:block; on a block element then causes it to show the way it did is a bit puzzling, but removing the display CSS attribute does the trick.

many thanks.

1DMF






"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
My guess is that Opera's default rendering for <noscript> is [tt]display: block;[/tt].

Then it checks to see if Javascript is enabled. If it is, the rendering's changed to [tt]display: none;[/tt].

(Or maybe they have some non-standard value like [tt]display: block-if-javascript-is-off-otherwise-none[/tt])

Then it applies any styling you put in your stylesheet, including changes to the [tt]display[/tt] property.

That's why the <noscript> gets displayed in Opera. Other browsers must be doing the Javascript check after applying your stylesheet.

I think it may be more of a difference in interpretation of the spec, rather than a bug as such. That's certainly how the Opera guys would spin it anyway...

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top