Assigning to undeclared variables is considered a bad practice (I hope
I don't need to explain the reasons here). The examples in the FAQ
should declare the variables it uses: http://www.jibbering.com/faq/#FAQ4_15
DocDom = (document.getElementById?true:false);
http://www.jibbering.com/faq/#FAQ4_42
wRef = window.open("http://example.com/page.html","windowName");
Nickolay 7 1077
In comp.lang.javascript message <11*********************@q2g2000cwa.goog
legroups.com>, Sun, 21 Jan 2007 17:37:24, Nickolay Ponomarev
<as*******@gmail.composted:
>Assigning to undeclared variables is considered a bad practice (I hope I don't need to explain the reasons here). The examples in the FAQ should declare the variables it uses:
http://www.jibbering.com/faq/#FAQ4_15
>DocDom = (document.getElementById?true:false);
http://www.jibbering.com/faq/#FAQ4_42
>wRef = window.open("http://example.com/page.html","windowName");
There is no need to show the declaration of variables unless the region
within which they need to be declared is shown in full.
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Delphi 3? Turnpike 6.05
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/&c., FAQqy topics & links;
<URL:http://www.bancoems.com/CompLangPascalDelphiMisc-MiniFAQ.htmclpdmFAQ;
<URL:http://www.borland.com/newsgroups/guide.htmlnews:borland.* Guidelines
On Jan 22, 4:46 pm, Dr J R Stockton <reply0...@merlyn.demon.co.uk>
wrote:
In comp.lang.javascript message <1169429844.253851.20...@q2g2000cwa.goog
legroups.com>, Sun, 21 Jan 2007 17:37:24, Nickolay Ponomarev
<asquee...@gmail.composted:
Assigning to undeclared variables is considered a bad practice (I hope
I don't need to explain the reasons here). The examples in the FAQ
should declare the variables it uses:
http://www.jibbering.com/faq/#FAQ4_15
DocDom = (document.getElementById?true:false);
http://www.jibbering.com/faq/#FAQ4_42
wRef = window.open("http://example.com/page.html","windowName");
There is no need to show the declaration of variables unless the region
within which they need to be declared is shown in full.
It is shown in full, since you can copy paste these snippets to use in
your code (I imagine this is the reason those snippets are in the FAQ).
No need to write a several-pages-long witty response as to why they are
not in fact shown in full - I'm not going to argue anymore.
Nickolay
Nickolay Ponomarev said:
> On Jan 22, 4:46 pm, Dr J R Stockton <reply0...@merlyn.demon.co.uk> wrote:
>In comp.lang.javascript message <1169429844.253851.20...@q2g2000cwa.goog legroups.com>, Sun, 21 Jan 2007 17:37:24, Nickolay Ponomarev <asquee...@gmail.composted:
>Assigning to undeclared variables is considered a bad practice (I hope I don't need to explain the reasons here). The examples in the FAQ should declare the variables it uses:
>http://www.jibbering.com/faq/#FAQ4_15 DocDom = (document.getElementById?true:false);
>http://www.jibbering.com/faq/#FAQ4_42 wRef = window.open("http://example.com/page.html","windowName");
There is no need to show the declaration of variables unless the region within which they need to be declared is shown in full.
It is shown in full, since you can copy paste these snippets to use in your code (I imagine this is the reason those snippets are in the FAQ).
No need to write a several-pages-long witty response as to why they are not in fact shown in full - I'm not going to argue anymore.
What a jerk. "Don't bother pointing out that I'm wrong, I'm not
going to respond".
if(window.open){
wRef = window.open("http://example.com/page.html","windowName");
}
Hardly qualifies as a snippet that would be copied and pasted.
--
On Jan 23, 4:35 am, Lee <REM0VElbspamt...@cox.netwrote:
Nickolay Ponomarev said:
No need to write a several-pages-long witty response as to why they are
not in fact shown in full - I'm not going to argue anymore.
What a jerk. "Don't bother pointing out that I'm wrong, I'm not
going to respond".
if(window.open){
wRef = window.open("http://example.com/page.html","windowName");
}Hardly qualifies as a snippet that would be copied and pasted.
At least you kept it short :)
Nickolay
Nickolay Ponomarev wrote:
On Jan 23, 4:35 am, Lee <REM0VElbspamt...@cox.netwrote:
if(window.open){
wRef = window.open("http://example.com/page.html","windowName");
}
Hardly qualifies as a snippet that would be copied and pasted.
BTW, that snippet is rather questionable. I wonder on what browsers
that support scripting the window.open call doesn't happen.
Nickolay
Nickolay Ponomarev wrote:
Nickolay Ponomarev wrote:
>On Jan 23, 4:35 am, Lee wrote:
>>if(window.open){ wRef = window.open("http://example.com/page.html","windowName");
} Hardly qualifies as a snippet that would be copied and pasted.
Indeed the intention of the entry (and linked resources) is to
discourage the attempt to open new windows.
BTW, that snippet is rather questionable. I wonder on what browsers
that support scripting the window.open call doesn't happen.
Embedded browsers on small systems that have no "window" concept in
their UI often do not provide a window.open method. There would be
little point as they could not open new "windows" even if they wanted
to. A specific example is WebBrowser 2.0 on the Palm OS (which is a
ECMA 262, 3rd Ed. scriptable, W3C DOM (Core + HTML) Level 1 standard
browser).
Given that mobile phones are now at the point where it is becoming
difficult to get one that does not have a web browser these small-scale
and functionally restricted browsers are probably about to peek in
their relevance.
Richard.
On Jan 23, 1:52 pm, "Richard Cornford" <Rich...@litotes.demon.co.uk>
wrote:
Nickolay Ponomarev wrote:
Nickolay Ponomarev wrote:
On Jan 23, 4:35 am, Lee wrote: if(window.open){ wRef = window.open("http://example.com/page.html","windowName");
>}
Hardly qualifies as a snippet that would be copied and pasted.Indeed the intention of the entry (and linked resources) is to
discourage the attempt to open new windows.
BTW, that snippet is rather questionable. I wonder on what browsers
that support scripting the window.open call doesn't happen.
Embedded browsers on small systems that have no "window" concept in
their UI often do not provide a window.open method. There would be
little point as they could not open new "windows" even if they wanted
to. A specific example is WebBrowser 2.0 on the Palm OS (which is a
ECMA 262, 3rd Ed. scriptable, W3C DOM (Core + HTML) Level 1 standard
browser).
Thanks for the information; didn't know there are embedded browsers
with DOM support, but without window.open.
By the way, I was looking at the first snippet (4.15) when I claimed it
was on the page for easy copy-paste.
Nickolay This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tommy Lang |
last post by:
Hi everybody!
I am trying to learn the basics of C++ myself and have a hard time
understanding some stuff like pointers and references etc.
I have created a small program that adds two numbers...
|
by: Ross A. Finlayson |
last post by:
Hi,
I'm scratching together an Access database. The development box is
Office 95, the deployment box Office 2003.
So anyways I am griping about forms and global variables. Say for
example...
|
by: Einar |
last post by:
Hi,
I wonder if there is a nice bit twiddling hack to compare a large
number of variables?
If you first store them in an array, you can do:
for (i = 0; i < n; i++) {
if (array != value) {...
|
by: Ant |
last post by:
hi,
I'm now using C#. Seeing as though you can declare & initialize or pass a
value to a variable on the same line as the declaration, is it still best
practice to group all the variables together...
|
by: martin |
last post by:
Hi,
I am a web page and a web user control. My web user control is placed in my
web page using the following directive
<%@ Register TagPrefix="uc1" TagName="Header"...
|
by: pauldepstein |
last post by:
Sorry in advance if this message sounds imprecise but it's difficult to
be precise when you don't really understand what's going on.
I have a class called Parameters. The default constructor...
|
by: CDMAPoster |
last post by:
About a year ago there was a thread about the use of global variables
in A97:
http://groups.google.com/group/comp.databases.ms-access/browse_frm/thread/fedc837a5aeb6157
Best Practices by Kang...
|
by: Zytan |
last post by:
I see that static is more restricted in C# than in C++. It appears
usable only on classes and methods, and data members, but cannot be
created within a method itself. Surely this is possible in...
|
by: RB |
last post by:
Hi clever people :-)
I've noticed a lot of people stating not to use static variables with
ASP.NET, and, as I understand it, the reason is because the variable is
shared across user sessions -...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |