473,770 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<noscript> validation with XHTML problem

My homepage, www.jimpix.co.uk uses transitional XHTML.

The whole thing validates except one line:

<noscript><im g height="1" width="1" alt=""
src="http://u0.extreme-dm.com/0.gif?tag=riggo tt&amp;j=n" /></noscript>

I get this error on this page:

http://validator.w3.org/check?uri=ht...w.jimpix.co.uk

Line 106, column 18: document type does not allow element "noscript" here;
missing one of "object", "applet", "map", "iframe", "button", "ins", "del"
start-tag

this is pointing to the start of the <noscript> tag.

I need the code to enable a site tracker I use (XTreme Tracking).

I have had a look on usenet and the web, but can't find anything to help
solve it.

Thanks

Jim
Jul 20 '05
12 21773
On Wed, 31 Dec 2003 12:27:56 +0100, Anne van Kesteren
<ma**@annevanke steren.nl> wrote:
Nick Kew wrote:
Can't check while I'm offline, but that probably means you've put
<noscript> in an inline element. I expect you'd also get a more
helpful error message from Page Valet or the WDG Validator.


Correct. <noscript/> may not appear within <font/> or any other inline
element.

<font/> shouldn't appear at all on a page, but that is a different subject.


Neither should noscript... and for much better reasons than font,
font is unlikely to get in the way of the content of the document,
script is and by virtue of having noscript, it's clear that the author
is relying on the script working, something that is never guaranteed.
<NOSCRIPT/> should be removed.

Jim.
--
comp.lang.javas cript FAQ - http://jibbering.com/faq/

Jul 20 '05 #11
ji*@jibbering.c om (Jim Ley) wrote:
by virtue of having noscript, it's clear that the author
is relying on the script working, something that is never guaranteed.
<NOSCRIPT/> should be removed.


(I wonder why people use notations like <NOSCRIPT/> - maybe because
slashes make _everything_ better? :-) )

The HTML 4.01 specification says, somewhat oddly,

"The NOSCRIPT element allows authors to provide alternate content when
a script is not executed. The content of a NOSCRIPT element should only
be rendered by a script-aware user agent in the following cases:
- The user agent is configured not to evaluate scripts.
- The user agent doesn't support a scripting language invoked by a
SCRIPT element earlier in the document."

This looks self-contradictory, isn't it? If all SCRIPT elements contain
scripts in a language supported by the browser, and the browser is
configured to execute scripts, then the latter part says, very clearly,
that a browser must not render NOSCRIPT content. No matter what happens
when the browser tries to execute the scripts.

But apparently the solution is that the first sentence is just sloppy
language and should be ignored, or interpreted so that "a script is not
executed" _means_ what the text says later.

As far as I know, browsers deal with it even more simplistically. They
render NOSCRIPT content if and only if configured not to execute
scripts. And in a sense this is much simpler.

But you're right in saying that authors _expect_ scripts to work. On
the other hand, what could they do? NOSCRIPT is not supposed to solve
all the problems in the world, or even all the problems with scripts.
Just some of them.

The NOSCRIPT element is poorly designed, and so is SCRIPT. For example,
if you wish to include HTML elements that are present only when
scripting is enabled (e.g., a button that works via scripting only),
you need to take the clumsy way of generating it with document.write( ).

But NOSCRIPT is occasionally useful. For example, if a page essentially
relies on JavaScript being enabled, it is better to say that than to do
nothing about the problem, and NOSCRIPT lets the author do that without
disturbing people who have scripting enabled.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #12
On Sun, 4 Jan 2004 23:29:08 +0000 (UTC), "Jukka K. Korpela"
<jk******@cs.tu t.fi> wrote:
As far as I know, browsers deal with it even more simplistically. They
render NOSCRIPT content if and only if configured not to execute
scripts. And in a sense this is much simpler.
I've certainly seen more advanced behaviour than this.
But you're right in saying that authors _expect_ scripts to work. On
the other hand, what could they do?
Use the appropriate scripting techniques. Visit comp.lang.javas cript
for discussion on them.
The NOSCRIPT element is poorly designed, and so is SCRIPT. For example,
if you wish to include HTML elements that are present only when
scripting is enabled (e.g., a button that works via scripting only),
you need to take the clumsy way of generating it with document.write( ).
Well yes, but you're assuming that having a button appearing when
scripting is enabled is a good idea, it's not generally, it would only
be appropriate where you're refusing to provide any fallback for that
functionality.. (and neither do you need to rely on document.write,
not that there's anything wrong with document.write of course)
But NOSCRIPT is occasionally useful. For example, if a page essentially
relies on JavaScript being enabled, it is better to say that than to do
nothing about the problem, and NOSCRIPT lets the author do that without
disturbing people who have scripting enabled.


Except of course you then leave people who the script errored for not
knowing anything (especially if they aren't informed about script
errors, the default in most UA's.) Much better to hide the message
reporting that script is required as a side effect of the script
working.

Jim.
--
comp.lang.javas cript FAQ - http://jibbering.com/faq/

Jul 20 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4775
by: Gustav Medler | last post by:
Hello, there is a known problem with Opera and the execution of content shown in <NOSCRIPT> tag. Everythings works fine, if there is only one simple script like: http://www.dr-wald.de/test/Opera-NOSCRIPT.html Switching off Javascript will show the alternative content. Javascript enabled will only show the JS-content, _not_ the <NOSCRIPT> content.
2
2875
by: llaxman | last post by:
Hello everyone, I was wondering if anyone can help me? I am having some problems wit the <noscript> tag. I actually use it to block banner advertisements from being displaye in my website. I have used it at the <body> tag section and look something like this: <noscript>
13
10696
by: Paul | last post by:
Hello: I read the FAQ about embedding HTML code in a Javascript. I have used the "<\/tag>" format to get around validator problems. Now the <NOSCRIPT> block is failing with error #65: 1. Line 52, column 9: document type does not allow element "NOSCRIPT" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag <NOSCRIPT>
7
2350
by: Spartanicus | last post by:
Afaik the use of a <noscriptelement is frowned upon nowadays. For a JS random image changer I tried to use a replacement by having the script change the HTML src attribute value of an img element. The trouble is that in some situations like over slow connections (on initial load when the JS is in an external file), or with a slow client the image specified in the HTML starts to load and display before it's changed by the script. This I'm...
1
2486
by: Gretsch | last post by:
I have a lot of nicely formatted HTML to be displayed for visitors WITHOUT script (/enabled), and a second set of HTML for those WITH script. The <noscript> tag allows me to separate the HTML for those without script, How can I separate the HTML for those with script? (ie not run for those without script enabled. The only way I've found so far is: ... <noscript> This should only be diplayed when scripting is not configured
28
2495
by: FreeCopywritingTips | last post by:
Does anyone know how to get around the </noscriptissue, were my HTML editor refuses to save this tag?
4
3975
by: phpmel | last post by:
<%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script language="JavaScript" type="text/javascript"> </script> <noscript> <b>Please</b> Try this page for browsers that can not handle SCRIPTing. <a href="EnableJavascript.aspx">click here</a> </noscript>
1
1638
by: phpmel | last post by:
hi guys, here is my problem, i have a masterpage that has a menu. on my homepage, i added the <noscript> tag to verify if the user has scripting enabled or not in the browser. When scripting is disabled and the error message is shown, the menu which is part of the masterpage,is disabled also so unless the user enables scripting,then the menu is non functional. i wanted to know why this is happening because even though javascript is not...
0
9618
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10259
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10101
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.