Click here to Skip to main content
15,120,459 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionHow To Use Dynamic variable in Javascript Pin
pranay kumar 202127-May-21 4:14
Memberpranay kumar 202127-May-21 4:14 
AnswerRe: How To Use Dynamic variable in Javascript Pin
jkirkerx16-Jun-21 16:01
professionaljkirkerx16-Jun-21 16:01 
QuestionHow to deskew a page of pdf document which is loaded through pdf.js Pin
Member 1520321817-May-21 9:58
MemberMember 1520321817-May-21 9:58 
QuestionJavascript Array Wrapper or Class Pin
Member 1510027612-May-21 15:23
MemberMember 1510027612-May-21 15:23 
QuestionUse of assignment operator inside {} Pin
captain prime30-Apr-21 2:40
Membercaptain prime30-Apr-21 2:40 
AnswerRe: Use of assignment operator inside {} Pin
Richard Deeming30-Apr-21 2:49
mveRichard Deeming30-Apr-21 2:49 
GeneralRe: Use of assignment operator inside {} Pin
captain prime30-Apr-21 19:23
Membercaptain prime30-Apr-21 19:23 
QuestionMulti select with Id:Value init issue - Tabulator.js (Oli Folkerd) Pin
Member 105369228-Apr-21 0:38
MemberMember 105369228-Apr-21 0:38 
I have some difficulties with a multiple select (ID:VALUE).
My Goal is to make a multiselect pulldown (like gender-sample) with the difference that i want to see only the text not the value's (value's are my Database ID's).

First off all I am pretty new with the tabulator library and still learning Smile | :)

Now I wrote some code witch works fine when you place only one id in a dataset-row, with multiply id's the view looks good but when you open this select for the firsttime ID's are placed as text in cell and there are no options selected in the pulldown. When you select some everything works like I want.

I'll think i am missing some intitalize code? Or do I need a customeditor too?
This is my code:


{
title: "City",
field: "citycode",
editor: "select",
editorParams:
{
multiselect:true,
values: city
},
cellClick:function(e, cell)
{

},
formatter: function(cell, formatterParams, onRendered)
{
var row = cell.getRow();
var rowIndex = row.getIndex();
sel = document.createElement('select');

sel.style.width = '100%';
sel.style.color = 'lime';
sel.style.height = '40px';
sel.style.position = "relative";
sel.style.border = 'none';
sel.style.background = 'inherit';

var cellContent = '';

if (cell.getValue() !== undefined) {
var cellStr = cell.getValue().toString();
var cityArr = cellStr.split(",");
var i;
for (i = 0; i < cityArr.length; i++) {
if (i > 0) cellContent += ',';
cellContent += city[cityArr[i]];
}
}

sel.innerHTML = '' + cellContent + ''; // Show the text in UI instead of Value.

var mess = document.getElementById("message"); //refer to the div tag
mess.innerHTML = cell.getValue(); //set text in the div tag

return sel;
}
},
QuestionNode express.js API slow response on first time request Pin
Member 1395114022-Apr-21 2:36
MemberMember 1395114022-Apr-21 2:36 
QuestionHelp Pin
fielle14-Apr-21 23:17
Memberfielle14-Apr-21 23:17 
AnswerRe: Help Pin
Richard Deeming14-Apr-21 23:51
mveRichard Deeming14-Apr-21 23:51 
Question8yr JS now giving me console error in FF and CHROME Pin
Member 1514660811-Apr-21 10:07
MemberMember 1514660811-Apr-21 10:07 
AnswerRe: 8yr JS now giving me console error in FF and CHROME Pin
Richard Deeming11-Apr-21 22:29
mveRichard Deeming11-Apr-21 22:29 
GeneralRe: 8yr JS now giving me console error in FF and CHROME Pin
Member 1514660812-Apr-21 4:00
MemberMember 1514660812-Apr-21 4:00 
GeneralRe: 8yr JS now giving me console error in FF and CHROME Pin
Richard Deeming12-Apr-21 4:09
mveRichard Deeming12-Apr-21 4:09 
GeneralRe: 8yr JS now giving me console error in FF and CHROME Pin
Member 1514660812-Apr-21 4:14
MemberMember 1514660812-Apr-21 4:14 
GeneralRe: 8yr JS now giving me console error in FF and CHROME Pin
Richard Deeming12-Apr-21 4:39
mveRichard Deeming12-Apr-21 4:39 
GeneralRe: 8yr JS now giving me console error in FF and CHROME Pin
Member 1514660812-Apr-21 5:00
MemberMember 1514660812-Apr-21 5:00 
QuestionKendo UI for jQuery Combobox noDataTemplate Not Loading Pin
Hypermommy5-Apr-21 10:35
MemberHypermommy5-Apr-21 10:35 
Questionquirks with use of Audio() Pin
Derell Licht31-Mar-21 17:03
professionalDerell Licht31-Mar-21 17:03 
QuestionBizarre JSON parse problem Pin
intoittendenz29-Mar-21 0:27
Memberintoittendenz29-Mar-21 0:27 
AnswerRe: Bizarre JSON parse problem Pin
Richard Deeming29-Mar-21 1:36
mveRichard Deeming29-Mar-21 1:36 
QuestionCreating a JSON body payload in plain JavaScript Pin
jkirkerx27-Mar-21 10:46
professionaljkirkerx27-Mar-21 10:46 
AnswerRe: Creating a JSON body payload in plain JavaScript [solved] Pin
jkirkerx27-Mar-21 11:52
professionaljkirkerx27-Mar-21 11:52 
GeneralRe: Creating a JSON body payload in plain JavaScript [solved] Pin
intoittendenz29-Mar-21 2:01
Memberintoittendenz29-Mar-21 2:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.