Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Google Pixel 9 Pro
vgp
Updated:
Thursday at 5:57 PM
Ad icon
Jobreceive.com for sale
Blogerwiki
Updated:
Tuesday at 8:55 PM
Post Your Vehicle for Sale — FREE! - https://libro.lk
Kalu_Puth
Updated:
Tuesday at 7:38 PM
ඔයාගෙ Assignment හෝ Thesis එක හරියට හදාගමු
ErMurazor
Updated:
Sep 26, 2026
Ad icon
BlackWall V2ray servers
hu KANNA
Updated:
Sep 23, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Help
App script උදව්වක් දෙන්න
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="euler" data-source="post: 28171730" data-attributes="member: 570186"><p>මම ගොඩක් ට්රයි කලා ඒක කරන්න.ඒක කරගන්න බැරි උනා <img src="/styles/default/xenforo/smilies/default/sad.gif" class="smilie" loading="lazy" alt=":(" title="Sad :(" data-shortname=":(" /> </p><p></p><p></p><p></p><p>පස්සේ පහල විදියට stack overflow එකක් බලාගෙන මේ දේ ඉගෙන ගන්න හිතුනේ.</p><p></p><p>1. මේකෙන් ඩේටා ටික ගූගල් ශීට් එකකින් ගන්නවා.</p><p></p><p>[CODE] function createTable(dataArray) {</p><p> DataTable({</p><p> //data: dataArray,</p><p> data: dataArray.slice(1),</p><p> columns: [</p><p> { title: "ID" },</p><p> { title: "NAME" },</p><p> { title: "INSTITUTION" },</p><p> { title: "LogNumber" },</p><p> { title: "value" },</p><p> { title: "PERSON" },</p><p> { title: "Edit", "render": function (data,type){</p><p> return "<button type='button' class='btn btn-outline-warning btn-xs editBtn' data-toggle='modal' data-target='#myModal' onclick='editData(this);'><i class='fa fa-edit'></i></button>";</p><p> }</p><p> },</p><p></p><p> { title: "Delete", "render": function (data,type){</p><p> return "<button type='button' class='btn btn-outline-danger btn-xs deleteBtn' onclick='deleteData(this);'><i class='fa fa-trash''></i></button>";</p><p> }</p><p> },</p><p> ]</p><p> }[/CODE]</p><p></p><p>2. පහල කෝඩ් එකෙන් ෆිල්ටර් කරන්න පුලුවන් කියලා තිබුනට මොකක් හරි වැරැද්දක් තිබෙනවා. මොකක්ද තේරෙන්නේ නෑ</p><p></p><p>[CODE]<input type="text" id="personfilter" onkeyup="filterRows()">';[/CODE]</p><p></p><p>[CODE] function filterRows(a) {</p><p> var table = document.getElementById("createTable(dataArray)");</p><p> var tr = table.getElementsByTagName("title");</p><p> var length = tr.length;</p><p> // specify the column on which you want to perform the filtering:</p><p> var columnNumber = 5;</p><p> var searchField = document.getElementById("personfilter");</p><p> var filter = searchField.value;</p><p> // Loop through all table rows, and hide those who don't match the search query</p><p> for (var i = 0; i < tr.length; i++) {</p><p> var td = tr.getElementsByTagName("DataTable")[5];</p><p> var input = td.innerHTML;</p><p> if (input && input.indexOf(filter) > -1) {</p><p> tr[i].style.display = "";</p><p> } else {</p><p> tr[i].style.display = "none";</p><p> }</p><p> }</p><p> }[/CODE]</p><p></p><p>Any idea where I lost?</p><hr /><p></p><p><strong><span style="color: rgb(209, 72, 65)"><span style="font-size: 15px">ස්තූතියි අදහසට. මම උත්සාහ කරන්නම්. USER ta වෙනස් කරන්න බැරිවෙන්නයි filter වෙන්න ඕනේ. (ලොගින් username එකට අනූව data filter කරගන්න බැරි නිසා මම බැලුවේ search bar එකේ default search key එකක් search වෙලා load වෙන්නත් ඒක user ට වෙනස් කරන්න බැරි වෙන්නත්).</span></span></strong></p><p></p><p><strong><span style="color: rgb(209, 72, 65)"><span style="font-size: 15px">මම uda දාලා තියෙන data array එකෙන්ම filter karaගන්න ක්රමයක් තියෙනවද?</span></span></strong></p><p>------ <span style="font-size: 10px">Post added on [DATETIME="UT"]1663344609[/DATETIME]</span></p></blockquote><p></p>
[QUOTE="euler, post: 28171730, member: 570186"] මම ගොඩක් ට්රයි කලා ඒක කරන්න.ඒක කරගන්න බැරි උනා :( පස්සේ පහල විදියට stack overflow එකක් බලාගෙන මේ දේ ඉගෙන ගන්න හිතුනේ. 1. මේකෙන් ඩේටා ටික ගූගල් ශීට් එකකින් ගන්නවා. [CODE] function createTable(dataArray) { DataTable({ //data: dataArray, data: dataArray.slice(1), columns: [ { title: "ID" }, { title: "NAME" }, { title: "INSTITUTION" }, { title: "LogNumber" }, { title: "value" }, { title: "PERSON" }, { title: "Edit", "render": function (data,type){ return "<button type='button' class='btn btn-outline-warning btn-xs editBtn' data-toggle='modal' data-target='#myModal' onclick='editData(this);'><i class='fa fa-edit'></i></button>"; } }, { title: "Delete", "render": function (data,type){ return "<button type='button' class='btn btn-outline-danger btn-xs deleteBtn' onclick='deleteData(this);'><i class='fa fa-trash''></i></button>"; } }, ] }[/CODE] 2. පහල කෝඩ් එකෙන් ෆිල්ටර් කරන්න පුලුවන් කියලා තිබුනට මොකක් හරි වැරැද්දක් තිබෙනවා. මොකක්ද තේරෙන්නේ නෑ [CODE]<input type="text" id="personfilter" onkeyup="filterRows()">';[/CODE] [CODE] function filterRows(a) { var table = document.getElementById("createTable(dataArray)"); var tr = table.getElementsByTagName("title"); var length = tr.length; // specify the column on which you want to perform the filtering: var columnNumber = 5; var searchField = document.getElementById("personfilter"); var filter = searchField.value; // Loop through all table rows, and hide those who don't match the search query for (var i = 0; i < tr.length; i++) { var td = tr.getElementsByTagName("DataTable")[5]; var input = td.innerHTML; if (input && input.indexOf(filter) > -1) { tr[i].style.display = ""; } else { tr[i].style.display = "none"; } } }[/CODE] Any idea where I lost? [HR][/HR] [B][COLOR=rgb(209, 72, 65)][SIZE=4]ස්තූතියි අදහසට. මම උත්සාහ කරන්නම්. USER ta වෙනස් කරන්න බැරිවෙන්නයි filter වෙන්න ඕනේ. (ලොගින් username එකට අනූව data filter කරගන්න බැරි නිසා මම බැලුවේ search bar එකේ default search key එකක් search වෙලා load වෙන්නත් ඒක user ට වෙනස් කරන්න බැරි වෙන්නත්).[/SIZE][/COLOR][/B] [COLOR=rgb(209, 72, 65)][SIZE=4][B][/B][/SIZE][/COLOR] [B][COLOR=rgb(209, 72, 65)][SIZE=4]මම uda දාලා තියෙන data array එකෙන්ම filter karaගන්න ක්රමයක් තියෙනවද?[/SIZE][/COLOR][/B] ------ [SIZE=2]Post added on [DATETIME="UT"]1663344609[/DATETIME][/SIZE] [/QUOTE]
Insert quotes…
Verification
Payakata winadi keeyak tibeda?
Post reply
Top
Bottom