Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Read data form dataset with JavaScript
Migrateduser
Hi all,<br />
<br />
I would like to know what is the easiest way to read data from a data-set by using JavaScript?<br />
<br />
What I'm trying to do is:<br />
I have a query that return a list of ages<br />
<strong class='bbc'>Query Text:</strong><br />
<pre class='_prettyXprint _lang-auto _linenums:0'>SELECT age as ages, age_code AS code
FROM table1
</pre>
<br />
<strong class='bbc'>Query return value:</strong><br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
age | code
0 - 18 | 1
19 - 30 | 2
31 - 50 | 3
51+ | 4
</pre>
<br />
What I would like to do is to create a drop-down list that will have all those values.<br />
Meaning that the value will be equal to the code and the text will be equal to the age.<br />
<br />
For example, if I where to write the drop down manually the code will be like that:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<select id="list1">
<option value="default"></option>
<option value="1">0 - 18</option>
<option value="2">19 - 30</option>
<option value="3">31 - 50</option>
<option value="4">51+</option>
</select>
</pre>
<br />
<strong class='bbc'>The main issue is to create a scenario that is completely automatically, because the ages values or code can change and I do not want to have to make change is the HTML code as well every time</strong><br />
<br />
I have tried many ways to do that but without much success, <br />
Please help me<br />
Thanks a lot<br />
Shlomi
Find more posts tagged with
Comments
There are no comments yet