***** -------Look up Tables in Java Script ---- Urgent

Posted by Nismeh under JavaScript on 11/13/2013 | Points: 10 | Views : 1088 | Status : [Member] | Replies : 3
Hi,

I want to use Lookup table in JavaScript.

For reference
http://stackoverflow.com/questions/9006111/is-there-a-simple-way-to-create-a-javascript-lookup-table

As shown in this link I want to do something like

var data = {
1: {
2: {
3: 45
}
},
2: {
2: {
3: 98
}
}
};

console.log(data[1][2][3]); // 45
console.log(data[2][2][3]); // 98

// or
var A = 1, B = 2, C = 3;
console.log(data[A][C]); // still 45


But now I am little confused. How should I call these functions using HTML controls

I'll be thankful if some one provide me running code demo or fully coded demo.

IT KNOWLEDGE IS APPLIED KNOWLEDGE
So Just Do It



Responses

Posted by: Bandi on: 11/13/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down

Refer
http://www.webmasterworld.com/javascript/4451217.htm
https://coderwall.com/p/6e7rea

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Nismeh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: vishalneeraj-24503 on: 11/13/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Hi refer below links :-

https://coderwall.com/p/6e7rea
http://my.safaribooksonline.com/book/programming/javascript/9781449382308/algorithms-and-flow-control/conditionals
http://stackoverflow.com/questions/9006111/is-there-a-simple-way-to-create-a-javascript-lookup-table
http://stackoverflow.com/questions/16026079/return-a-lookup-table-for-an-html-select-menu

Nismeh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nismeh on: 11/13/2013 [Member] Starter | Points: 25

Up
0
Down
I appreciate for your response. But I want this values to be assigned to label which is an html control
Like if its an English Language than It should Show 'Name'
If its French language than it should show 'nom'

I'll select language via radio button again html control.

I am confused while calling and reflecting values for perticular key and its values.

IT KNOWLEDGE IS APPLIED KNOWLEDGE
So Just Do It

Nismeh, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response