Microsoft
Software
Hardware
Network
Question : JS Object Key Variable?
var tool = 'something'
stack = { tool : 'data'}
it always returns key as "tool" instead of the value of "tool" which is "something"
im trying to accomplish the following in JS but here is a PHP example
$tool = "something";
$stack[$tool] = data;
i know its not pretty.....
Answer : JS Object Key Variable?
use :
1: 2: 3: 4:
var stack = {}; var tool = 'something'; stack[tool] = 'data'; //alert(stack.something);
Random Solutions
How do I delete a file from a folder (uploads directory) when I delete its reference in the database?
Installing SSL certifcate on exchange 2010
After moving mailbox to Exchange 2007 lost all Outlook rules
Avoid pinned programs expanding in Windows 7 start menu
Installing BES on SBS 2008
dateDiff - combining a date selection and a time selection
Communigate Pro bounce back "The message was not delivered because the return address was refused"
TSQL nested WHILE EXISTS
Printing multiple divs using java script
Drupal - changing css for only one View