I am extracting data from a database that I do not administer. It is a single list, and the important values are:
Integer
String
I have successfully created a Tree-structured browser, based on a model using <ul>
and <li>
tags. I had also implemented action listeners on double click, that found the id, and acted accordingly. The identifications were stored, and found as a value
-parameter to the individual <li>
's that represented the leaves, or filenames.
However it turns out that the Index numbers are not unique. I expected them to be, even though there were a column for UID
's. I tried to set the value
to be the UID String
. It works in my browser, as a snippet of my generated HTML code shows:
<li role="treeitem" value="1581f20c-0ef9-4c21-a8ab-a407da310cf5" ... >
However, when I retrieve the value, and save it to database, it only gets the numeric value that appears ahead of the first non-numeric character. In this case 1581. I've checked, and come to the conclusion that the value-parameter only accepts numeral values, which really sucks for me...
Are there any other ways to tie a non-displayed UID String to a HTML-list element?
EDIT 2:
I removed my previous edit, due to a realization of what my misunderstanding was. Custom data tags needs the syntax "data-variablename", and when retrieving it, I should ommit the "data-", and just get the variablename.
value
is already an html attribute. So the browser try to fix your value when you use it. Try to use a custom attribute like data-value
:
<li role="treeitem" data-value="1581f20c-0ef9-4c21-a8ab-a407da310cf5" ... >
Try this:
HTML:
<li data-uid="[your-UID-here]">
jQ:
$("li").data("uid");
I want to recognize "Str","Int","[Str]","[Int]","[[Str]]",... I thought I could do something like (Str|Int|\[\1\]) where \1 self references the group. I know from formal language theory that ...
I want to recognize "Str","Int","[Str]","[Int]","[[Str]]",... I thought I could do something like (Str|Int|\[\1\]) where \1 self references the group. I know from formal language theory that ...
I was trying to test using JavaScript scripts to add content to a template at the time of processing by a PDF render-er, specifically Apache FOP. I know that XSL can call a javascript file that can in ...
I was trying to test using JavaScript scripts to add content to a template at the time of processing by a PDF render-er, specifically Apache FOP. I know that XSL can call a javascript file that can in ...
On the Node-Webkit web site (https://github.com/rogerwang/node-webkit/wiki/File-dialogs) it says to use the <Input type="file"> to bring up a file picker dialog, and then listen for the change ...
On the Node-Webkit web site (https://github.com/rogerwang/node-webkit/wiki/File-dialogs) it says to use the <Input type="file"> to bring up a file picker dialog, and then listen for the change ...
The ember documentation states that there is a finally handler available on Promises: http://emberjs.com/api/classes/Ember.RSVP.Promise.html#method_finally However, using finally on a promise yields ...
The ember documentation states that there is a finally handler available on Promises: http://emberjs.com/api/classes/Ember.RSVP.Promise.html#method_finally However, using finally on a promise yields ...