... It's a completely non-standard way of doing things, and is a bad idea because it's implementation-dependent. You can't complain if some new browser build...
5637
Casey
heavyccasey
Nov 7, 2008 8:41 pm
... var gbn = document.getElementsByName; var image = gbn('image139;); There's your shortened code. - Casey...
5638
Chad Oakenfold
chadoakenfold@...
Nov 7, 2008 8:42 pm
There is a document.images object that has all the images on a web page. You can access images using array notation like: document.images [1], maybe the...
5639
ray
hantechs@...
Nov 10, 2008 6:43 am
It seems it also works on Firefox on Linux, as I tested. ... [Non-text portions of this message have been removed]...
5640
ray
hantechs@...
Nov 10, 2008 6:53 am
Good trick. Thanks ... [Non-text portions of this message have been removed]...
5641
ray
hantechs@...
Nov 10, 2008 7:14 am
Is this the standard way? ... [Non-text portions of this message have been removed]...
5642
Paul Wilkins
pmw57
Nov 10, 2008 10:15 am
... Netscape create the DOM Level 0 standard, which has been around for as long as JavaScript. See http://www.quirksmode.org/js/dom0.html -- Paul Wilkins...
5643
Srinivasan
srinivasan_i...
Dec 3, 2009 12:35 pm
Hi, I have two basic questions, 1. what is the difference between function f() { } and var f = function() { } Could anyone explain the advantages,...
5644
Jelks Cabaniss
jelkscabaniss
Dec 3, 2009 3:20 pm
To get around cross-browser issues, use a framework API like Prototype or Jquery. Example (after including prototype.js): someDiv.observe('click39;, function() {...
5645
Martin Reurings
mreuring
Dec 3, 2009 3:31 pm
1. I think I did know the answer once upon a time, but I can't be sure now. I think, personally, there is no difference. When I actually still 'assign39; a...
5646
Jim Auldridge
jaaulde
Dec 3, 2009 3:41 pm
Re. your first question: The first version does not explicitly declare f before defining it, so if f already exists in the reach of the scope in which you're...
5647
Ben Curtis
QuixoteExoLa...
Dec 3, 2009 4:26 pm
... I'm really bad with that. But I can tell you this: if you assign the function to a variable (your second example) *always* scope it locally with "var" or...
5648
Anders Nawroth
lists@...
Dec 3, 2009 6:10 pm
Hi! ... The biggest practical difference I've stumbled upon is that in the first case you can call the function before the declaration, in the second case you...
5649
Peter-Paul Koch
ppkwdf
Dec 29, 2009 2:50 pm
Hello, This group WDF-DOM has a venerable history, but it seems that nowadays it's mostly dead. This year, 2009, there were exactly 6 mails, and last year,...
5650
Joshua Olson
joshua@...
Dec 29, 2009 2:56 pm
Peter, I actually learned quite a bit from the few emails that went through... Is there a more active forum for posting questions about DOM issues? Is evolt's...
5651
levon ghazaryan
ayb_bengim
Dec 29, 2009 11:19 pm
Hi Peter, with Google and a lot of documentation around it is rather strange to me to write/read messages starting with "how do I...?" or "where can I find...
5652
Srinivasan
srinivasan_i...
Jan 1, 2010 12:41 pm
Hi All, 1. Using anonymous functions bad? [while attaching events, settimeout] 2. Invoking the print dialog is available, but invoking the page setup dialog is...
5653
srini
srinivasan_i...
Jan 1, 2010 12:44 pm
Hi, @ Jelks and @ Martin, Thanks, will try the frameworks. @Ben. That was a beautiful example. Thanks for the enlightenment. @Jim. Thanks for the info and...
5654
levon ghazaryan
ayb_bengim
Jan 1, 2010 2:45 pm
... why bad? actually anonymous functions and closures are the definit advantages that javascript offers to a developer. in my point of view it (javascript)...
5655
diego nunes
troyandev
Jan 1, 2010 4:38 pm
... But if you don't know what you're doing, you can make a huge mess and waste a lot of precious memory. Especially if you do "old school programming" and put...
5656
Jonathan Hurshman
jhurshman
Jan 7, 2010 12:21 am
How about http://stackoverflow.com? ... From: Joshua Olson <joshua@...> To: wdf-dom@yahoogroups.com Sent: Tue, December 29, 2009 9:56:25 AM Subject:...
5657
Srinivasan
srinivasan_i...
Mar 21, 2010 1:27 pm
Hi all, Just tried testing scope of the variables in JS. When testing with following code.I got "toColorPart" as answer. Why? for (var x = 3 in 20) { var a =...
5658
Scott Sauyet
scott_sauyet
Mar 23, 2010 1:12 am
... That's bizarre. When I try it in FF 3.6, it responds "3". -- Scott...
5659
Casey
heavyccasey
Mar 23, 2010 5:10 am
... Are you using Prototype? Prototype add properties to Number objects (http://www.prototypejs.org/api/number). Since for in loops through all the properties...
5660
Josh McDonald
gfunk0072
Mar 23, 2010 9:42 am
What's bizzare? You're doing a for..in on a Number, which apparently in FF has no enumerable properties, (hence never gets changed from 3), and in another...
5661
Srinivasan
srinivasan_i...
Mar 23, 2010 12:34 pm
Hi all, Thanks for your replies. But why do a for..in on a Number? I was just testing scopes of the variables in JS. This was just something ridiculous and so...
5662
Jonathan Hurshman
jhurshman
Mar 25, 2010 12:48 pm
"toColorPart" seems to be a method added to the Number prototype by the prototype framework. http://www.prototypejs.org/api/number/tocolorpart ...
5663
Emanuele Del Grande
emanueledelg...
Sep 15, 2010 7:49 pm
Hello and wishes of a good 2010 to everybody. I am trying to get all the elements having attributes with a specified namespace, such as for example "gov": <a...
5664
Lev Lazar
ayb_bengim
Mar 10, 2011 5:03 pm
Hi all, does anyone have experience with IE9 and Object.defineProperty? I tried to reproduce the examples in: ...
5665
Lev Lazar
ayb_bengim
Mar 15, 2011 10:47 am
The solution is simple: IE9 has the possibility to be run in IE7 (8,9 or 6) mode. So if you come across such a weird behavior, check the document mode and the...