Search Results

Search found 26956 results on 1079 pages for 'javascript arrays'.

Page 6/1079 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • javaScript .splice() not working on correctly

    - by adardesign
    I am setting a cookie for each navigation container that is clicked on. It sets an array that is joined and set the cookie value. if its clicked again then its removed from the array. It somehow buggy. It only splices after clicking on other elements. and then it behaves weird. Thanks much. var navLinkToOpen; var setNavCookie = function(value){ var isSet = false; var checkCookies = checkNavCookie() setCookieHelper = checkCookies? checkCookies.split(","): []; console.log("value passed", value) for(i in setCookieHelper){ if(value == setCookieHelper[i]){ setCookieHelper.splice(value,1); isSet = true; } } if(!isSet){ setCookieHelper.push(value) } setCookieHelper.join(",") document.cookie = "navLinkToOpen"+"="+setCookieHelper; } var checkNavCookie = function(){ var allCookies = document.cookie.split( ';' ); for (i = 0; i < allCookies.length; i++ ){ temp = allCookies[i].split("=") if(temp[0].match("navLinkToOpen")){ var getValue = temp[1] } } return getValue || false } $(document).ready(function() { $("#LeftNav li").has("b").addClass("navHeader").not(":first").siblings("li").hide() $(".navHeader").click(function(){ $(this).toggleClass("collapsed").nextUntil("li:has('b')").slideToggle(300); setNavCookie($('.navHeader').index($(this))) return false }) console.log("init",document.cookie) var testCookies = checkNavCookie(); if(testCookies){ finalArrayValue = testCookies.split(",") for(i in finalArrayValue){ $(".navHeader").eq(finalArrayValue[i]).toggleClass("collapsed").nextUntil(".navHeader").slideToggle (0); } } });

    Read the article

  • getting a key out of a javascript hash

    - by mcintyre321
    I working with the latest draft of the twitter annotations api. An example bit of data looks like status { annotations : [ {myAnnotationType:{myKey:myValue}}, {someoneElsesAnnotationType:{theirKey:theirValue}}, ] } now i want to check a status to see if it has an annotation with myAnnotationType in it. If annotations was a hash instead of an array I could just write var ann = status.annotations.myAnnotationType. But its not so I wrote this instead: function getKeys(obj){ var keys = []; for (key in obj) { if (obj.hasOwnProperty(key)) { keys[keys.length] = key; } } return keys; } function getAnnotation(status, type){ for(var i=0;i<status.annotations.length;i++){ var keys = getKeys(status.annotations[i]); for(var j=0;j<keys.length;j++){ if(keys[j] == type){ return status.annotations[i]; } } } } var ann = getAnnotation(status, "myAnnotationType"); There must be a better way! Is there? PS I can't use jquery or anything as this is js to be used in a caja widget and the container doesn't support external libs

    Read the article

  • JavaScript Loop and wait for function

    - by Fluidbyte
    I have a simple single-dimension array, let's say: fruits = ["apples","bananas","oranges","peaches","plums"]; I can loop thru with with $.each() function: $.each(fruits, function(index, fruit) { showFruit(fruit); }); but I'm calling to another function which I need to finish before moving on to the next item. So, if I have a function like this: function showFruit(fruit){ $.getScript('some/script.js',function(){ // Do stuff }) } What's the best way to make sure the previous fruit has been appended before moving on?

    Read the article

  • Javascript Canvas Element - Array Of Images

    - by Ben Shelock
    I'm just learning JS, trying to do things without jQuery, and I want to make something similar to this however I want to use an array of images instead of just the one. My image array is formed like this var image_array = new Array() image_array[0] = "image1.jpg" image_array[1] = "image2.jpg" And the canvas element is written like this. (Pretty much entirely taken from the Mozilla site) function draw() { var ctx = document.getElementById('canvas').getContext('2d'); var img = new Image(); img.src = 'sample.png'; img.onload = function(){ for (i=0;i<5;i++){ for (j=0;j<9;j++){ ctx.drawImage(img,j*126,i*126,126,126); } } } } It uses the image "sample.png" in that code but I want to change it to display an image from the array. Displaying a different one each time it loops. Apoligies if I've not explained this well.

    Read the article

  • Javascript and VERY LONG string

    - by StealthRT
    Hey all, i am having problems with the below code: function showTableData() { var tableArray; var x = 0; var theHTML; for (i = 0; i < 7032; i++) { if (x = 0) { theHTML = '<tr>' + '<th scope="row" class="spec">' + partNum[i] + '</th>' + '<td>' + Msrp[i] + '</td>' + '<td>' + blah[i] + '</td>' + '<td>' + blahs[i] + '</td>' + '</tr>' + theHTML; x++; }else{ theHTML = '<tr>' + '<th scope="row" class="specalt">' + partNum[i] + '</th>' + '<td class="alt">' + Msrp[i] + '</td>' + '<td class="alt">' + blah[i] + '</td>' + '<td class="alt">' + blahs[i] + '</td>' + '</tr>' + theHTML; x--; } } theHTML = '<table id="mytable" cellspacing="0">' + '<tr>' + '<th scope="col" abbr="Configurations" class="nobg">Part Number</th>' + '<th scope="col" abbr="Dual 1.8">Msrp Price</th>' + '<th scope="col" abbr="Dual 2">blahs Price</th>' + '<th scope="col" abbr="Dual 2.5">Low Price</th>' + '</tr>' + theHTML + '</table>'; $('#example').append(theHTML); } </script> <div id="example"> </div> The problem being that the $('#example').append(theHTML); never executes (or shows on the page). I think its because the string is soooooo long! It has over 7,000 items in the array so im not sure if thats the reason or if its something else? Any help would be great! Thanks! David

    Read the article

  • JavaScript: Very strange behavior with assigning methods in a loop

    - by Andrey
    Consider this code below: <a href="javascript:void(-1)" id="a1">a1</a> <a href="javascript:void(-1)" id="a2">a2</a> <script type="text/javascript"> var buttons = [] buttons.push("a1") buttons.push("a2") var actions = [] for (var i in buttons) { actions[buttons[i]] = function() { alert(i) } } var elements = document.getElementsByTagName("a") for (var k = 0; k < elements.length; k++) { elements[k].onclick = actions[elements[k].id] } </script> Basically, it shows two anchors, a1 and a2, and I expect to see "1" and "2" popping up in an alert when clicking on corresponding anchor. It doesn't happen, I get "2" when clicking on either. After spending an hour meditating on the code, I decided that it probably happens because dynamic onclick methods for both anchors keep the last value of "i". So I change that loop to for (var i in buttons) { var local_i = i.toString() actions[buttons[i]] = function() { alert(local_i) } } hoping that each dynamic function will get its own copy of "i" with immediate value. But after this change I get "1" popping up when I click on either link. What am I doing wrong? It's a huge show stopper for me.

    Read the article

  • Chrome extension javascript array bug?

    - by Wayne Werner
    Hi, I'm working on a Google Chrome extension. In the popup I have the following code: var bookmarks = []; function appendBMTnode(node){ bookmarks.push([node[0].title, node[0].id]); } function addchildren(results){ for(x = 0; x < results.length; x++){ bookmarks.push([results[x].title, results[x].id]); chrome.bookmarks.getChildren(results[x].id, addchildren); } } function getallbookmarks(){ chrome.bookmarks.get('0', appendBMTnode); chrome.bookmarks.getChildren('0', addchildren); } console.debug(bookmarks.length); console.debug(bookmarks); Now, I would assume that the first command would issue the # of bookmarks I have. Indeed, when I use Chrome's debugger and add bookmarks.length to the watch list, 418 is the value. In the console of the debugger I can write bookmarks.length and it will give me the correct length. I can type for(x = 0; x < bookmarks.length; x++){ console.debug(bookmarks[x]); } and I get string representations of each inner array. However, that original console.debug(bookmarks.length) gives an output of zero. And if I add console.debug(bookmarks[0]); to the popup.html it tells me that the value is undefined. This seems like a bug to me, but my real question is how can I iterate over this list? Thanks

    Read the article

  • Retrieving data from a JSON sub array in javascript, where identifier starts with an integer

    - by Archie Ec
    I must be missing something simple here, but I'm having trouble retrieving data from a JSON array response. I can access objects with identifiers that start with letters, but not ones that start with numbers. For example, I can access data.item[0].specs.overview.details But I can't access data.item[0].specs.9a99.details If anyone can point me in the right direction, I'd really appreciate it. Thanks.

    Read the article

  • javascript array/object issue

    - by FlyingCat
    I am trying to push elements to an array. for (a=0; a < test.length; a++){ if(this.testnumber != test[a].number){ //it will only loop 8 times under conditional statement group = { title: test.Title , ID: test.ID, contents: [] }; this.company.push(group); this.testnumber = test.number[a]; } //outside of if conditional statement.. it will loop 15 times //i want every test[a].conetents get pushed to group.contents array. //this.company is the final variable I need for this function... group.contents.push(test[a].contents); } However, when I do console.log(this.company); I see 8 elmements with only 1 element in each group.contents array The ideal situation is to have 8 elements with 2 to 3 elements in the group.contents array I hope I explain my situation well. Any idea how to solve my issue? Thanks a lot!

    Read the article

  • passing the parent form on the onclick event to javascript function

    - by user1051505
    Hi I am trying to pass variables on the onclick event to a javascript function. I am trying the following way, I can't get the input value in the javascript function.(I am expecting an alert of 1.) Is it the right way of doing this? Please help. <head> <script> function submit_value(form) { alert(form.ip.value); } </script> </head> <table> <tr> <form> <td> <input id="ip" type="text" value="1"> </td> <td> <a href="javascript:;" onClick="submit_value(this)">Button</a> </td> </form> </tr> </table>

    Read the article

  • Javascript push Object to cookies using JSON

    - by Hunkeone
    Hi All on click button I need to add object to array and then write array to cookies. From the start this array can be not empty so I parse cookie first. function addToBasket(){ var basket = $.parseJSON($.cookie("basket")) if (basket.length==0||!basket){ var basket=[]; basket.push( { 'number' : this.getAttribute('number'), 'type' : this.getAttribute('product') } ); } else{ basket.push( { 'number' : this.getAttribute('number'), 'type' : this.getAttribute('product') } ); } $.cookie("basket", JSON.stringify(basket)); } And HTML <button type="button" class="btn btn-success btn-lg" number="12" product="accs" onclick="addToBasket()">Add</button> Unfortunately I'm getting Uncaught ReferenceError: addToBasket is not defined onclick. Can't understand what am I doing wrong? Thanks!

    Read the article

  • JavaScript sorting array from nested array?

    - by Tim
    I have an array: letterFrequency = [["a", 12], ["b", 25], ["c", 34], ["d", 1], ["e", 35], ["f", 8], ["g", 7], ["h", 67], ["i", 35], ["j", 0], ["k", 53], ["l", 0], ["m", 0], ["n", 3], ["o", 0], ["p", 0], ["q", 3], ["r", 153], ["s", 0], ["t", 0], ["u", 15], ["v", 0], ["w", 0], ["x", 3], ["y", 0], ["z", 0]] and I want to sort it in descending order based on the number within the nested array i.e. letterFrequency[i][1]. So I want the most popular letter to be first. How would I do this?

    Read the article

  • Get Next and Previous Elements in JavaScript array...

    - by Belden
    I have a large array, with non-sequential IDs, that looks something like this: PhotoList[89725] = new Array(); PhotoList[89725]['ImageID'] = '89725'; PhotoList[89725]['ImageSize'] = '123'; PhotoList[89726] = new Array(); PhotoList[89726]['ImageID'] = '89726'; PhotoList[89726]['ImageSize'] = '234'; PhotoList[89727] = new Array(); PhotoList[89727]['ImageID'] = '89727'; PhotoList[89727]['ImageSize'] = '345'; Etc.... I'm trying to figure out, given an ID, how can I can get the next and previous ID... So that I could do something like this: <div id="current">Showing You ID: 89726 Size: 234</div> Get Prev Get Next Obviously, if we're at the end or beginning of the array we just a message...

    Read the article

  • populate array fron list onclick javascript

    - by user3703591
    I 'm writing a code with JS and I don't know how to populate array when clicking on button. We have this code, which uses a list (ul), where the items (li) can be moved with mouse. How can do onclick to populate an array with 2 data, its first position and the last position? <!doctype html> <html lang="en"> <head> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> <script src="https://raw.github.com/furf/jquery-ui-touch-punch/master/jquery.ui.touch-punch.min.js"></script> <script> $(function() { $( ".documents" ).sortable(); $( ".documents" ).disableSelection(); }); </script> <meta charset="utf-8"> <title>toArray demo</title> <style> span { color: red; } </style> </head> <body> Reversed - <span></span> <ul id="opciones" class="documents"> <li>uno</li> <li>dos</li> <li>tres</li> </ul> <script> function disp( li ) { var a = []; for ( var i = 0; i < li.length; i++ ) { a.push( li[ i ].innerHTML ); } $( "span" ).text( a.join( " " ) ); } disp( $( "li" ).toArray() ); </script> <input type="button" value="actualizar_array" onclick="disp('#opciones')" /> </body> </html>

    Read the article

  • Problem with Javascript object and accessing property which exists

    - by Newbie
    I have something like this: var test = {}; function blah() { test[2] = 'filled'; } console.log(test); //result test -> 2:"filled" console.log(test[2]); //result undefined I don't understand why I'm getting 'undefined' in the second instance when according to the first instance, the property of that object clearly exists! Does anyone have any ideas? Thanks

    Read the article

  • remove item from array javascript

    - by Red
    I was trying to remove some items from an array , Array.prototype.remove = function(from, to) { var rest = this.slice((to || from) + 1 || this.length); this.length = from < 0 ? this.length + from : from; return this.push.apply(this, rest); }; var BOM = [0,1,0,1,0,1,1]; var bomlength = BOM.length; for(var i = 0; i < IDLEN ;++i) { if( BOM[i] == 1) { BOM.remove(i); //IDLEN--; } } RESULT IS BOM = [0,0,0,1]; expected result is BOM = [0,0,0]; its looks like i am doing something wrong , Please help me. Thanks.

    Read the article

  • Javascript Noob Question. Need Help With Simple Script

    - by three3
    Hi everyone, I am new to JavaScript (only a couple of days of reading a book) and I am stuck on this code snippet. I have looked at it over and over again but cannot seem to figure out why it is not working. I am sure it is something really simple that I have just looked over but I really just need a fresh pair of eyes to look at this. The code is supposed to update a placeholder image on a page without the page having to reload. But when I am clicking on the link of an image, it is taking me to the link where the image is located instead of replacing the placeholder image. Here is my HTML code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Image Gallery</title> <script type="text/javascript" src="scripts/showPic.js"></script> </head> <body> <h1>Snapshots</h1> <ul> <li> <a href="images/cat.jpg" onclick="showPic(this); return false;" title="A Cat">Cat</a> </li> <li> <a href="images/night.jpg" onclick="showPic(this); return false;" title="Night">Night</a> </li> <li> <a href="images/coke.jpg" onclick="showPic(this); return false;" title="Coke">Coke</a> </li> <li> <a href="images/sport.jpg" onclick="showPic(this); return false;" title="Sports">Sport</a> </li> <li> <a href="images/mnms.png" onclick="showPic(this); return false;" title="MnM's">MnM's</a> </li> <li> <a href="images/kid.jpg" onclick="showPic(this); return false;" title="A Kid">Kid</a> </li> </ul> <br /> <img id="placeholder" src="images/placeholder.jpg" alt="Place Holder Image" /> </body> </html> And here is the JavaScript function I am using to get this done: <script type="text/javascript"> function showPic(whichpic) { var source = whichpic.getAttribute("href"); var placeholder = document.getElementById("placeholder"); placeholder.setAttribute("src",source); } </script> Any help is greatly appreciated and thanks in advance for the help.

    Read the article

  • Need Help With This Simple Script (JavaScript Noob Question)

    - by three3
    Hi everyone, I am new to JavaScript (only a couple of days of reading a book) and I am stuck on this code snippet. I have looked at it over and over again but cannot seem to figure out why it is not working. I am sure it is something really simple that I have just looked over but I really just need a fresh pair of eyes to look at this. The code is supposed to update a placeholder image on a page without the page having to reload. But when I am clicking on the link of an image, it is taking me to the link where the image is located instead of replacing the placeholder image. Here is my HTML code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Image Gallery</title> <script type="text/javascript" src="scripts/showPic.js"></script> </head> <body> <h1>Snapshots</h1> <ul> <li> <a href="images/cat.jpg" onclick="showPic(this); return false;" title="A Cat">Cat</a> </li> <li> <a href="images/night.jpg" onclick="showPic(this); return false;" title="Night">Night</a> </li> <li> <a href="images/coke.jpg" onclick="showPic(this); return false;" title="Coke">Coke</a> </li> <li> <a href="images/sport.jpg" onclick="showPic(this); return false;" title="Sports">Sport</a> </li> <li> <a href="images/mnms.png" onclick="showPic(this); return false;" title="MnM's">MnM's</a> </li> <li> <a href="images/kid.jpg" onclick="showPic(this); return false;" title="A Kid">Kid</a> </li> </ul> <br /> <img src="images/placeholder.jpg" title="Place Holder Image"> </body> </html> And here is the JavaScript function I am using to get this done: <script type="text/javascript"> function showPic(whichpic) { var source = whichpic.getAttribute("href"); var placeholder = document.getElementById("placeholder"); placeholder.setAttribute("src",source); } </script> Any help is greatly appreciated and thanks in advance for the help.

    Read the article

  • flash blocking javascript events

    - by jedierikb
    this is an edit of the original post now that I better understand the problem. now with source code! In IE, if body (or another html div has focus), then you keypress & click on flash at the same time, then release... a keyup event is never fired. It is not fired in javascript or in flash. Where is this keyup event? This is the order of event firing you get instead: javascriptKeyEvent:bodyDn ** currentFocuedElement: body javascriptKeyEvent:docDn ** currentFocuedElement: body actionScriptEvent::activate ** currentFocuedElement: [object] actionScriptEvent::mouseDown ** currentFocuedElement: [object] actionScriptEvent::mouseUp ** currentFocuedElement: [object] Subsequent keyup and keydown events are captured by flash, but that initial keyUp is never fired.. anywhere. And I need that keyup! Here is the html/javascript: <html> <head> <script type="text/javascript" src="p.js"></script> <script type="text/javascript" src="swfobject.js"></script> <script> function ic( evt ) { Event.observe( $("f1"), 'keyup', onKeyHandler.bindAsEventListener( this, "f1Up" ) ); Event.observe( $("f2"), 'keyup', onKeyHandler.bindAsEventListener( this, "f2Up" ) ); Event.observe( document, 'keyup', onKeyHandler.bindAsEventListener( this, "docUp" ) ); Event.observe( $("body"), 'keyup', onKeyHandler.bindAsEventListener( this, "bodyUp" ) ); Event.observe( window, 'keyup', onKeyHandler.bindAsEventListener( this, "windowUp" ) ); Event.observe( $("f1"), 'keydown', onKeyHandler.bindAsEventListener( this, "f1Dn" ) ); Event.observe( $("f2"), 'keydown', onKeyHandler.bindAsEventListener( this, "f2Dn" ) ); Event.observe( document, 'keydown', onKeyHandler.bindAsEventListener( this, "docDn" ) ); Event.observe( $("body"), 'keydown', onKeyHandler.bindAsEventListener( this, "bodyDn" ) ); Event.observe( window, 'keydown', onKeyHandler.bindAsEventListener( this, "windowDn" ) ); Event.observe( "clr", "mousedown", clearHandler.bindAsEventListener( this ) ); swfobject.embedSWF( "tmp.swf", "f2", "100%", "20px", "9.0.0.0", null, {}, {}, {} ); } function clearHandler( evt ) { clear( ); } function clear( ) { $("log").innerHTML = ""; } function onKeyHandler( evt, dn ) { logIt( "javascriptKeyEvent:"+dn ); } function AS2JS( wha ) { logIt( "actionScriptEvent::" + wha ); } function logIt( k ) { var id = document.activeElement; if (id.identify) { id = id.identify(); } $("log").innerHTML = k + " ** focuedElement: " + id + "<br>" + $("log").innerHTML; } Event.observe( window, 'load', ic.bindAsEventListener(this) ); </script> </head> <body id="body"> <div id="f1"><div id="f2" style="width:100%;height:20px; position:absolute; bottom:0px;"></div></div> <div id="clr" style="color:blue;">clear</div> <div id="log" style="overflow:auto;height:200px;width:500px;"></div> </body> </html> Here is the as3 code: package { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.KeyboardEvent; import flash.events.MouseEvent; import flash.events.Event; import flash.external.ExternalInterface; public class tmpa extends Sprite { public function tmpa( ):void { extInt("flashInit"); stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; stage.addEventListener( KeyboardEvent.KEY_DOWN, keyDnCb, false, 0, true ); stage.addEventListener( KeyboardEvent.KEY_UP, keyUpCb, false, 0, true ); stage.addEventListener( MouseEvent.MOUSE_DOWN, mDownCb, false, 0, true ); stage.addEventListener( MouseEvent.MOUSE_UP, mUpCb, false, 0, true ); addEventListener( Event.ACTIVATE, activateCb, false, 0, true ); addEventListener( Event.DEACTIVATE, dectivateCb, false, 0, true ); } private function activateCb( evt:Event ):void { extInt("activate"); } private function dectivateCb( evt:Event ):void { extInt("deactivate"); } private function mDownCb( evt:MouseEvent ):void { extInt("mouseDown"); } private function mUpCb( evt:MouseEvent ):void { extInt("mouseUp"); } private function keyDnCb( evt:KeyboardEvent ):void { extInt( "keyDn" ); } private function keyUpCb( evt:KeyboardEvent ):void { extInt( "keyUp" ); } private function extInt( wha:String ):void { try { ExternalInterface.call( "AS2JS", wha ); } catch (ex:Error) { trace('ex: ' + ex); } } } }

    Read the article

  • Best server-side javascript servers.

    - by fmsf
    Hey, I've been wondering to try out server-side javascript for a while. And I'm finding a good amount of servers, like: Node.js Rhino SpiderMonkey among others. Could anyone with experience on server-side javascript, tell me which are the best engines? and why? I like the Node.js because it's based on Google's V8 engine. And seems easy to use. But some feedback on what you would choose would be great. Edit: Some benchmarks for Node. I'm thinking on going with this one but feedback is still welcome. Thanks

    Read the article

  • javascript error "invalid XML attribute value <script language=JavaScript>\n"

    - by kmunky
    i have some javascript files included in my html file for months. It used to work just fine until couple of days ago, now my scripts don't run anymore and i get javascript error "invalid XML attribute value <script language=JavaScript>\n" with firebug. Does anyone know what this error means and how to get rid of it? i guess is something about that newline "\n" but i can't see that in my file if i open it.

    Read the article

  • Ruby on Rails Mysterious Javascript Alert box with cookie information

    - by conorgil
    I have a problem in a Ruby on Rails app that I am working on. I have been working on the app for months and I have never had this problem before and after a bit of Google searches I think that somehow someone is trying to steal cookies with javascript. When I click on the link I get an alert box titled "the page at www.napkinboard.com says:" and contains the following message: __utmz=217223433.1270652009.59.3.utmcsr=localhost:3000|utmccn=(referral)|utmcmd=referral|utmcct=/; __utma=217223433.2133018314.1265749085.1271097412.1271125626.63; __utmc=217223433; __utmb=217223433.11.10.1271125626 I checked the database and all data associated with this 'food_item' looks completely normal and does not contain any javascript at all. How did this suddenly happen and how can I stop it? I appreciate any help. Thanks.

    Read the article

  • What is the `name` keyword in JavaScript?

    - by Joey Adams
    When I typed this apparently innocent snippet of code: values.name gedit highlighted name as a keyword. However, name is not listed by the pages linked to by an answer to a question about reserved keywords. I also did a couple trivial tests in SpiderMonkey, but name seemed to act like an ordinary identifier. A Google search didn't tell me much either. However, I did find a page listing name in "Other JavaScript Keywords". My guess is that name is a function or a member of some DOM element and does not intrude on the namespace. Is name really a keyword in JavaScript? If so, what does it do?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >