Safari problem

hi,

don’t understand this Safari problem… pls see
http://www.mayacove.com/jq/test-safari.html

in Safari… with JS disabled…

and compare with how it looks in FF, IE…

two problems with Safari (again, with JS disabled):

essentially, year is generated with JS object, and hard-coded for noscript… (not my scirpt, this is at work, this is what I have to work with…:wink: two problems with Safari:

  1. it adds line-breaks betw copyright symbol and year, and
  2. I can’t overwrite font-color for <noscript> or what comes after it… again, in noscript… in IE and FF these two problems do not occur…
  3. I also put a green border around hard-coded year, Safari is not playing ball…:frowning:

what’s with these Safari problems… have never had weird problems like this in Safari… would appreciate suggestions…

thank you…

Hi,

The noscript element can’t be inside a p element which is why safari is probably ignoring it.

It should be the other way around:


<noscript><p>hello</p></noscript>

You don’t really need the noscript element anyway as you could have the no JS display as the default and then change/hide it dynamically for javascript users.

thank you very much all for yr responses…

indeed first responder was correct…

I ended up repeating entire copyright statement in both JS and noscript, in its own paragr… now it works fine…

thank you very much…

That and your colleagues should know that noscript misses so many…

misses those with NoScript ('cause the browser itself still has scripts enabled I guess)
misses those whose corporate/whatever firewall is blocking scripts (again, because the browser itself actually has scripts enabled)
misses anyone if the script goofs and doesn’t run (actually, I’m not sure about this one, I’d have to actually try it)

I just got a copy of jQuery: Novice to Ninja, and it is fantastic for dealing with exactly these kinds of issues. The noscript element is not well supported and the implementation is buggy cross-browser.

The better option which jQuery can automate a lot of underlying mechanics to is literally craft two versions of the web page (which you’ve already put some thought into with the noscript tag. As much as possible it is advantageous to condense the differences into a limited number of container divs. Then using jQuery you can turn off one div, and then add a whole new set of elements for your JS enabled version. Allowing jQuery to handle this ensures that the JS version will only be enabled if your scripts are actually running clientside (this is far better than browser sniffing, or searching for JS support from the server side). It also means that if scripts AREN’T running, then your website is laid out flawlessly in the XHTML you wish to create for users without JS.