473,787 Members | 2,798 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 #1
69 16895
ma**********@gm ail.com wrote:
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>
<URL:http://validator.w3.or g/>
<script type="text/javascript">
<!-- ^^^^
Unnecessary and potentially harmful.
function breakOut() {
top.location.hr ef = 'https://foo.com';
top.location = 'https://foo.com/';

is sufficient and not prone to the Same Origin Policy.
}
// --> ^^^^^^
Unnecessary.
</script>
<body onLoad="setTime out('breakOut() ',5ØØØ);"> ^^^
This is not the zero ('0') character. ---'
[...]

PointedEars
Dec 14 '05 #2
That worked!

Why are the <!-- //--> considered harmful? Aren't they supposed to help
JS-crippled browsers degrade?

- Mark

Dec 14 '05 #3
ma**********@gm ail.com said the following on 12/14/2005 12:55 PM:
That worked!

Why are the <!-- //--> considered harmful? Aren't they supposed to help
JS-crippled browsers degrade?


They aren't harmful in an HTML document. They simply aren't needed is
all. There are no modern browsers that do not understand the script tag
and what to do with it in the absence of script. Whether that absence is
caused by disabling or the lack of script support at all.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Dec 14 '05 #4
ma**********@gm ail.com wrote:
Why are the <!-- //--> considered harmful?
/Please/, ask Google (Groups) before you ask here. I am tired of explaining
that over and over again.
Aren't they supposed to help JS-crippled browsers degrade?


No. All UAs have to recognize the `script' element since HTML 3.2 and to
ignore it if not applicable.
PointedEars
Dec 14 '05 #5
Randy Webb wrote:
ma**********@gm ail.com said the following on 12/14/2005 12:55 PM:
Why are the <!-- //--> considered harmful? Aren't they supposed to help
JS-crippled browsers degrade?


They aren't harmful in an HTML document. [...]


Wrong.
PointedEars
Dec 14 '05 #6
Thomas 'PointedEars' Lahn said the following on 12/14/2005 2:27 PM:
ma**********@gm ail.com wrote:

Why are the <!-- //--> considered harmful?

/Please/, ask Google (Groups) before you ask here. I am tired of explaining
that over and over again.


Then obviously you are failing in your endeavors to pedantically explain it.

It is pedantic because it is irrelevant.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Dec 14 '05 #7
Thomas 'PointedEars' Lahn said the following on 12/14/2005 2:41 PM:
Randy Webb wrote:

ma**********@ gmail.com said the following on 12/14/2005 12:55 PM:
Why are the <!-- //--> considered harmful? Aren't they supposed to help
JS-crippled browsers degrade?


They aren't harmful in an HTML document. [...]

Wrong.


Wrong again PointedHead. Unless of course you can name a modern browser
that with *Valid HTML* has a problem with it. Your move.

There is a very good reason why I wrote "in an HTML document".

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Dec 14 '05 #8
> /Please/, ask Google (Groups) before you ask here. I am tired of
explaining
that over and over again.


you mentioned it in teh first place !!

Dec 14 '05 #9
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.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Dec 14 '05 #10

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
2460
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
18513
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
17062
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
17922
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
2271
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
4049
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
10691
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
1595
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
9655
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
9497
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
10169
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...
0
9964
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
8993
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
7517
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
5398
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...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3670
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.