473,799 Members | 2,741 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

missing ) after argument list

Why is Firefox complaining with this error:

------------------------------------------------------------
missing ) after argument list

setTimeout('bre akOut',5000);
------------------------------------------------------------

Here is the HTML that I'm producing:

<html>
<head>
<script type="text/javascript">
<!--
function breakOut() {
top.location.hr ef = 'https://foo.com';
}
// -->
</script>
<body onLoad="setTime out('breakOut() ',5ØØØ);">
You have been logged out of the control panel due to inactivity for
your security.
</body>
</html>

Dec 14 '05
69 16900
VK

Matt Kruse wrote:
Thomas 'PointedEars' Lahn wrote:
No. All UAs have to recognize the `script' element since HTML 3.2
and to ignore it if not applicable.


Your assumption is that everyone is using a browser which supports HTML 3.2
or higher.

While this may be a realistic assumption, in theory any user could be using
an ancient browser.


.... or have a personal reason to support an ancient browser. If I like
to have my page rendered nicely in NCSA Mosaic then why should it be
prohibited by anyone? - while supporting not too much younger IE 4.x is
supposed to be a valid (or even welcomed) action?

Also let do not mix the terms "harmful" and "not necessary".

<!-- --> tag is valid HTML comment tag since the first draft and till
now and for forever. (Unlike by the way [CDATA] block which is *XML
tag* and has nothing to do with HTML). So <!-- --> is no more "harmful"
than <html> or <body>

Is it necessary? - *Mostly* no. But if one likes to use it - let's not
make a crime from it. It is an overkill precaution, but no more
*criminal* or *overkill* then checking
if (document.getEl ementById)
The chances to be useful in both cases are equal (somewhere around
0.001%) but still above zero.

Dec 14 '05 #11
Matt Kruse wrote:
Thomas 'PointedEars' Lahn wrote:
No. All UAs have to recognize the `script' element since HTML 3.2
and to ignore it if not applicable.


Your assumption is that everyone is using a browser which supports HTML
3.2 or higher.

While this may be a realistic assumption, in theory any user could
be using an ancient browser. And you like theory quite a bit.


Both in theory and in practice, RFC2854 as of June 2000 (that is 5 years
and 6 months ago), obsoletes _all_ HTML versions prior to 3.2 (which was
introduced on January 14, 1997, 9 years and 11 months ago!), hence
obsoletes all pre-3.2 UAs (which would not be usable today anyway). And
even if there were such an obsolete UA still in use (which includes that
it would need to be usable on current operating systems and hardware), it
would not (be allowed to) render content within the `head' element as that
has not changed since HTML 1.0.

I am completely sure I mentioned that before.

BTW: A nice resource I have found is
<URL:http://www.yourhtmlsou rce.com/starthere/historyofhtml.h tml>
PointedEars
Dec 14 '05 #12
VK wrote:
Also let do not mix the terms "harmful" and "not necessary".

<!-- --> tag is valid HTML comment tag since the first draft and till now
and for forever.
Nonsense! `<!' introduces an SGML declaration, `--' starts and ends a
comment within an SGML declaration, and `>' ends the declaration. It
is basically `<!>' to an SGML parser, an empty declaration. Everything
else is tag soup behavior that cannot be assumed. Which is why Mozilla/5.0
will not consider <!------> a closed comment in Strict Mode and does not
render the adjacent markup.
(Unlike by the way [CDATA] block which is *XML tag*
Nonsense! CDATA (Character DATA) is an SGML data type and it is possible
to declare data CDATA using the respective declaration in XML, which is an
SGML subset:

<![CDATA[
This is declared CDATA content if it was not CDATA
]]>
and has nothing to do with HTML).
Which is why it is harmful in XHTML, too.
So <!-- --> is no more "harmful" than <html> or <body>


Within CDATA, which is BTW the _default_ for the content of the `script'
element in HTML, '<!-- ... -->' is _not_ an empty declaration which is why
an SGML parser would pass it to the script engine could be passed it as-is
which would be a syntax error. As neither a HTML UA nor a script engine
is required to ignore that, the label "potentiall y harmful" is justified.

Even if the voices in your head tell something different.

Sigh. [psf 10.1]
PointedEars
Dec 14 '05 #13
VK

Thomas 'PointedEars' Lahn wrote:
VK wrote:
Also let do not mix the terms "harmful" and "not necessary".

<!-- --> tag is valid HTML comment tag since the first draft and till now
and for forever.


Nonsense! `<!' introduces an SGML declaration,


What in the holly name any SGML issues have to do with someting loaded
as "text/html" content type?

But I'm glad you brought some twilight "shining" on this question. Now
I will never use any doctype declarations and I will stop *anyone* from
suggesting them. Really: how can we imply a desclaration written with
brute violation of ... uhm... *SGML* standards plus potentially
*harmful*?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

where:
<http://www.w3.org/TR/html4/strict.dtd>

....
<!--====== Imported Names ==========-->
.... etc.
DOCTYPE - simply say NO!

Dec 14 '05 #14
VK wrote:
Thomas 'PointedEars' Lahn wrote:
VK wrote:
> Also let do not mix the terms "harmful" and "not necessary".
>
> <!-- --> tag is valid HTML comment tag since the first draft and till
> now and for forever. Nonsense! `<!' introduces an SGML declaration,


What in the holly name any SGML issues have to do with someting loaded
as "text/html" content type?


Because HTML is an SGML application. If you had read _any_ HTML Spec,
you would have known.
But I'm glad you brought some twilight "shining" on this question. Now
I will never use any doctype declarations and I will stop anyone from
suggesting them.


That is typical of you. Why avoid mistakes when it is possible to mask
them and get away with it? You are nothing but a poser, and your advice
is harmful or potentially harmful most of the time. Go away.
PointedEars
Dec 14 '05 #15
Thomas 'PointedEars' Lahn <Po*********@we b.de> wrote in
news:21******** ********@Pointe dEars.de:
VK wrote:
Also let do not mix the terms "harmful" and "not necessary".

<!-- --> tag is valid HTML comment tag since the first draft and till
now and for forever.
Nonsense! `<!' introduces an SGML declaration, `--' starts and ends a
comment within an SGML declaration, and `>' ends the declaration. It
is basically `<!>' to an SGML parser, an empty declaration.
Everything else is tag soup behavior that cannot be assumed. Which is
why Mozilla/5.0 will not consider <!------> a closed comment in Strict
Mode and does not render the adjacent markup.


What a load of unadulterated bandwidth waste yet again from you!!!

Take note of the following reasoning:

The letters 'c', 'a', 's', and 'e' by the themselves have certain
properties and characteristics which have meaning as characters to
Javascript, but when I put them together like this: "case"
then they become a reserved word in this interpreted language.

Isn't it funny how that works?

What would you do by your "reasoning" as exemplified above: you would
insist the characters must be considered IN and OF themselves and not be
considered in a context of "grouping" them thusly, and thus, in effect, you
would forbid the notion of words and even of Javascript itself. (I
sometimes wonder if I shouldn't do a search to see if you have already
commented on the logical non-existence or impossibility of Javascript
itself, among other ruminations involving contemplation of the navel.)

But if you don't believe me, maybe you'd like to argue with the standards-
making body called the W3 Consortium:

[from http://www.w3.org/TR/REC-html40/intro/sgmltut.html]

3.2.4 Comments

HTML comments have the following syntax:

<!-- this is a comment -->
<!-- and so is this one,
which occupies more than one line -->

White space is not permitted between the markup declaration open
delimiter("<!") and the comment open delimiter ("--"), but is permitted
between the comment close delimiter ("--") and the markup declaration
close delimiter (">"). A common error is to include a string of hyphens
("---") within a comment. Authors should avoid putting two or more
adjacent hyphens inside comments.

Information that appears between comments has no special meaning (e.g.,
character references are not interpreted as such).

Note that comments are markup.
CC: your response to this particular discussion to
to************* *******@w3.org.
(Unlike by the way [CDATA] block which is *XML tag*


Nonsense! CDATA (Character DATA) is an SGML data type and it is
possible to declare data CDATA using the respective declaration in
XML, which is an SGML subset:

<![CDATA[
This is declared CDATA content if it was not CDATA
]]>
and has nothing to do with HTML).


Which is why it is harmful in XHTML, too.
So <!-- --> is no more "harmful" than <html> or <body>


Within CDATA, which is BTW the _default_ for the content of the
`script' element in HTML, '<!-- ... -->' is _not_ an empty declaration
which is why an SGML parser would pass it to the script engine could
be passed it as-is which would be a syntax error. As neither a HTML
UA nor a script engine is required to ignore that, the label
"potentiall y harmful" is justified.


Why would an HTML user agent be parsing/interpreting content it has no
business parsing/interpreting (such as script element content)?

As for script interpreters, if they interpret HTML comment tags within
their own comment blocks, then they deserve to choke on whatever it is they
are voluntarily swallowing and should not be swallowing.

The model for creating a universal standard was set long ago with the
development of the handgun. As long as the developers agree to stick to
the standards where they exist, why will they intentionally produce
something that goes beyond the constraints of the framework set for them,
especially when in all likelihood they may do more harm than good in
"adding features" where none are called for? Why claim to render HTML
documents and not claim to interpret Javascript, but put an interpreter in
your product anyway and not tell the user, i.e., refuse to ignore what you
should be ignoring as a developer?
Even if the voices in your head tell something different.
If a parser doesn't get an indication of the type of document it is
parsing, should it even be exposing itself to "danger" or "harm" in the
first place by attempting to read it? Seriously....

Sigh. [psf 10.1]
PointedEars


Dec 15 '05 #16
Patient Guy wrote:
Thomas 'PointedEars' Lahn <Po*********@we b.de> wrote [...]:
VK wrote:
Also let do not mix the terms "harmful" and "not necessary".
<!-- --> tag is valid HTML comment tag since the first draft and till
now and for forever.
Nonsense! `<!' introduces an SGML declaration, `--' starts and ends a
comment within an SGML declaration, and `>' ends the declaration. It
is basically `<!>' to an SGML parser, an empty declaration.
Everything else is tag soup behavior that cannot be assumed. Which is
why Mozilla/5.0 will not consider <!------> a closed comment in Strict
Mode and does not render the adjacent markup.


What a load of unadulterated bandwidth waste yet again from you!!!
[...]
[from http://www.w3.org/TR/REC-html40/intro/sgmltut.html]


| 3.2 SGML constructs used in HTML
|
| The following sections introduce SGML constructs that are used in HTML.
| [...]
3.2.4 Comments

HTML comments have the following syntax:

<!-- this is a comment -->
<!-- and so is this one,
which occupies more than one line -->

White space is not permitted between the markup declaration open
delimiter("<!") and the comment open delimiter ("--"), but is permitted
between the comment close delimiter ("--") and the markup declaration
close delimiter (">"). A common error is to include a string of hyphens
("---") within a comment. Authors should avoid putting two or more
adjacent hyphens inside comments.
[...]


Now where is the contradiction, you address-munging, namespace-spoiling,
top-posting fool?
PointedEars
Dec 15 '05 #17
Thomas 'PointedEars' Lahn <Po*********@we b.de> wrote in
news:13******** ********@Pointe dEars.de:
Patient Guy wrote:
Thomas 'PointedEars' Lahn <Po*********@we b.de> wrote [...]:
VK wrote:
Also let do not mix the terms "harmful" and "not necessary".
<!-- --> tag is valid HTML comment tag since the first draft and
till now and for forever.

Nonsense! `<!' introduces an SGML declaration, `--' starts and ends
a comment within an SGML declaration, and `>' ends the declaration.
It is basically `<!>' to an SGML parser, an empty declaration.
Everything else is tag soup behavior that cannot be assumed. Which
is why Mozilla/5.0 will not consider <!------> a closed comment in
Strict Mode and does not render the adjacent markup.
What a load of unadulterated bandwidth waste yet again from you!!!
[...]
[from http://www.w3.org/TR/REC-html40/intro/sgmltut.html]


| 3.2 SGML constructs used in HTML
|
| The following sections introduce SGML constructs that are used in
| HTML. [...]
3.2.4 Comments

HTML comments have the following syntax:

<!-- this is a comment -->
<!-- and so is this one,
which occupies more than one line -->

White space is not permitted between the markup declaration open
delimiter("<!") and the comment open delimiter ("--"), but is
permitted between the comment close delimiter ("--") and the
markup declaration close delimiter (">"). A common error is to
include a string of hyphens ("---") within a comment. Authors
should avoid putting two or more adjacent hyphens inside comments.
[...]


Now where is the contradiction


Poster VK: <!-- --> tag is valid HTML comment tag since the first draft
and till now and for forever.

You: Nonsense! `<!' introduces an SGML declaration, `--' starts
and ends a comment within an SGML declaration, and `>' ends
the declaration.

W3 document: HTML comments have the following syntax:
<!-- this is a comment -->
Now what was hard about following that?

, you address-munging,
the address I gave was an obvious attempt at humor....
namespace-spoiling,
Okay...I give up...what are you trying to say here?
top-posting
It would be true had I really in truth top-posted. But all my responses,
interspersed or otherwise, were placed BELOW the text they were responding
to.

But then you already knew that....
fool?
Well, I have to admit that even I can occasionally be wrong and humbled.
Even by the likes of you.

The question before us is whether you have ever admitted to being wrong
and/or humbled, irrespective of the fact that you have been wrong and
humbled at times.
PointedEars


Dec 15 '05 #18
Patient Guy wrote:
Poster VK: <!-- --> tag is valid HTML comment tag since the first draft
and till now and for forever.

You: Nonsense! `<!' introduces an SGML declaration, `--' starts
and ends a comment within an SGML declaration, and `>' ends
the declaration.

W3 document: HTML comments have the following syntax:
<!-- this is a comment -->
Now what was hard about following that?


You missed another bit of the HTML standard:

W3 document: HTML 4 is an SGML application conforming to International
Standard ISO 8879 -- Standard Generalized Markup Language SGML (defined in
[ISO8879]).

and SGML defines a comment declaration differently than HTML.

So the question is which definition of a comment do you believe? The one
you quoted is a 'discussion' and therefore it is reasonable to assume it is
not normative. If taken literally it implies that HTML comments must
contain the text 'this is a comment', or 'and so is this one, which
occupies more than one line' so it is obvious that the statement 'HTML
comments have the following syntax' is wrong: they are giving some
examples, not specifying syntax. For the actual comment syntax you have to
fall back on the SGML standard.
Dec 15 '05 #19
VK

Duncan Booth wrote:
You missed another bit of the HTML standard:

W3 document: HTML 4 is an SGML application conforming to International
Standard ISO 8879 -- Standard Generalized Markup Language SGML (defined in
[ISO8879]).

and SGML defines a comment declaration differently than HTML.

So the question is which definition of a comment do you believe? The one
you quoted is a 'discussion' and therefore it is reasonable to assume it is
not normative. If taken literally it implies that HTML comments must
contain the text 'this is a comment', or 'and so is this one, which
occupies more than one line' so it is obvious that the statement 'HTML
comments have the following syntax' is wrong: they are giving some
examples, not specifying syntax. For the actual comment syntax you have to
fall back on the SGML standard.


You guys are something else...

You serve a page with MIME type "text/html"
You even link DTD document in the header in case if "some browser"
doesn't know how to tread <table> or <body> or comment tags.
But you are still all in worry that something can go wrong and browser
may read the source as pure SGML. The only solution you see by not
using anything of SGML, or better do not use any tags at all....

Sorry for you but please keep beginners out of discovers like "HTML
comments are harmful" or "textarea doesn't have and never had WRAP
property" etc. (WRAP property indeed doesn't exists by W3C).

Stop reading W3C obscure crap, get some fresh air and make a couple of
real world web-projects (best of all - for money). You'll come back as
all new better people, trust me.
:-)

P.S.
<quote>
<http://www.w3.org/MarkUp/html-spec/html-spec_3.html#SEC 3.2.5>
To include comments in an HTML document, use a comment declaration.

A comment declaration consists of `<!' followed by zero or more
comments followed by `>'.

Each comment starts with `--' and includes all text up to and including
the next occurrence of `--'.

In a comment declaration, white space is allowed after each comment,
but not before the first comment.

The entire comment declaration is ignored.
</quote>

Dec 15 '05 #20

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

Similar topics

8
3969
by: Alex Vinokur | last post by:
Various forms of argument passing ================================= C/C++ Performance Tests ======================= Using C/C++ Program Perfometer http://sourceforge.net/projects/cpp-perfometer http://alexvn.freeservers.com/s1/perfometer.html
4
2463
by: Conrad Weyns | last post by:
vc7.1 has no problem with the following snippet: template <typename T> class TTest { std::list<T*>::iterator m_It; }; but metrowerks codewarrior 9.2 kicks my butt and online Comeau confirms: 1. MW:
1
18514
by: soup_or_power | last post by:
I'm passing the return from window.open as a function argument and getting the error "missing ] after element list" when tested with FireFox. Here is the relevant code. Many thanks for your help. function blurCkbox(num, disp, but_id, sugg) { if (num == 1) { eval("self.opener.document.forms." + but_id + ".value=\'" + sugg + "\'");
77
17069
by: Ville Vainio | last post by:
I tried to clear a list today (which I do rather rarely, considering that just doing l = works most of the time) and was shocked, SHOCKED to notice that there is no clear() method. Dicts have it, sets have it, why do lists have to be second class citizens?
2
17923
by: ehsansad | last post by:
I have the following code. function updateTermsList() { var termDivBox = document.getElementById("termarea"); var terms = searchXMLHttp.responseXML.getElementsByTagName("term"); for(var i=0;i<terms.length;i++){ var name = terms.childNodes.firstChild.nodeValue; var value = new String(terms.childNodes.firstChild.nodeValue); var a = document.createElement('div');
5
2272
by: Vv_vV | last post by:
Hi all, I try to call onchange a function and get "missing ) after argument list" error Probably systaxis issue Thanks in advance for any help! Code: var html = ""; var myurl = "http://www.example.com/url.php?dummy=";
9
4051
by: deedub65 | last post by:
I am getting a "Missing ) after argument list" on two different sets of commands in the same script - they are part of Dreamweaver MX's files, so i am not sure how they got altered - thanks for the help! function canAcceptCommand() { // Make sure the focus is in the BODY of the document. var retVal = false; if (dw.getFocus() == 'document' && dw.getDocumentDOM().getFocus() == 'body') { retVal = true; } if...
4
10692
by: Pasquale | last post by:
I am attempting to populate a few select drop down menus from the selection of the first drop down. I am using ajax to submit data via a PHP GET and from the response populate the other drop down menus. I figured out how to get it to do so for more than one drop down, but I am getting the following error below. This was working fine until I tried to populate more than one other drop down menu. Any idea why the SELECT object isn't being...
8
2302
by: A. Anderson | last post by:
Howdy everyone, I'm experiencing a problem with a program that I'm developing. Take a look at this stack report from GDB - #0 0xb7d782a3 in strlen () from /lib/tls/i686/cmov/libc.so.6 #1 0xb7d4c2f7 in vfprintf () from /lib/tls/i686/cmov/libc.so.6 #2 0xb7d6441b in vsprintf () from /lib/tls/i686/cmov/libc.so.6 #3 0x08049ba0 in character_data::printf (this=0x800, argument=0x0) at character.c:198
1
1598
by: hariomt | last post by:
Hi, i have to create table's rows dynamically. I am using bellow code snipet... function copySelectedAttr() { var attrValue= document.getElementById('fromEntityAttrBox').options.text; var attrtype=document.getElementById('fromEntityAttrBox').value;
0
9688
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
9544
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,...
1
10238
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
10030
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9077
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7570
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5467
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
4145
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
3761
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.