Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.lang.javascript > #4946
| Path | csiph.com!news.fcku.it!weretis.net!feeder4.news.weretis.net!news.albasani.net!.POSTED!not-for-mail |
|---|---|
| From | Jan Novak <repcom@gmail.com> |
| Newsgroups | de.comp.lang.javascript |
| Subject | Re: not a function |
| Date | Thu, 26 Apr 2018 08:07:49 +0200 |
| Organization | albasani.net |
| Lines | 48 |
| Message-ID | <pbrqbl$7tr$1@news.albasani.net> (permalink) |
| References | <pbppha$jg2$1@news.albasani.net> <5377515.lOV4Wx5bFT@PointedEars.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Trace | news.albasani.net KB141S6kwdKz1WWyVhWTBsRAcXRL0vAI0G9AF1Gr9qX6UaCp/HrZLyUWJ1oJJ3SUpbGtzCeXLrrxMnsqRDZ7NA== |
| NNTP-Posting-Date | Thu, 26 Apr 2018 06:07:49 +0000 (UTC) |
| Injection-Info | news.albasani.net; logging-data="XbuYuZdV+z0FHPCLRsbgoadNN8Aa8Xme1wZ2bj1UT/jRe24uISxBNDvsuZliotH06dkNTKHNd+2Un7tOukUA1QiEJ/PV4BGDozb57j++drVQgR+3qtHP8OlI23bP6yZw"; mail-complaints-to="abuse@albasani.net" |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 |
| In-Reply-To | <5377515.lOV4Wx5bFT@PointedEars.de> |
| Content-Language | de-DE |
| Cancel-Lock | sha1:CILB0XNrNTpNrFg9nk6zUu/bnmo= |
| Xref | csiph.com de.comp.lang.javascript:4946 |
Show key headers only | View raw
Am 25.04.18 um 21:04 schrieb Thomas 'PointedEars' Lahn:
> Jan Novak wrote:
>
>> Ich habe folgenden JS Code aus bootstrap-treeview übernommen:
>
> Nein, hast Du _nicht_, sondern Du hast *wieder* ohne Sinn und Verstand
> Copy & Pray gemacht :-(
>
> <https://github.com/jonmiles/bootstrap-treeview/blob/542f57eab636e14417216e95fa7f7049bbf3d69f/public/index.html#L567-L579>
>
>> var initSelectableTree = $.getJSON(/include/fetch.php', function(data) {
> ^
>> return $('#treeview-selectable').treeview({
>> data: data,
>> multiSelect: multiSelect,
>> onNodeSelected: function(event, node) {
>> $('#selectable-output').prepend('<p>' + node.text + ' was
>> selected</p>');
>> },
>> onNodeUnselected: function (event, node) {
>> $('#selectable-output').prepend('<p>' + node.text + ' was
>> unselected</p>');
>> }
>> });
>> });
>>
>>
ich habe die Daten jetzt aus der Funktion ausgelagert:
$.ajax({
url: variable + '/include/fetch_doc_groups.php',
async: false
}).done(function(data) {
dataNeu = JSON.parse(data);
});
und hier nutze ich diese dann so:
var initSelectableTree = function() {
return $('#treeview-selectable').treeview({
data: dataNeu,
so funktioniert es.
Jan
Back to de.comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar
not a function Jan Novak <repcom@gmail.com> - 2018-04-25 13:41 +0200
Re: not a function Sascha Hüdepohl <news@juenger-der-himmlischen-teekanne.de> - 2018-04-25 17:49 +0200
Re: not a function Jan Novak <repcom@gmail.com> - 2018-04-26 07:39 +0200
Re: not a function Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-04-25 21:04 +0200
Re: not a function Jan Novak <repcom@gmail.com> - 2018-04-26 07:55 +0200
Re: not a function "Peter J. Holzer" <hjp-usenet3@hjp.at> - 2018-04-28 19:50 +0200
Re: not a function Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-04-29 01:14 +0200
Re: not a function Jan Novak <repcom@gmail.com> - 2018-04-26 08:07 +0200
Re: not a function Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-04-29 01:30 +0200
Re: not a function Jan Novak <repcom@gmail.com> - 2018-05-02 15:06 +0200
Re: not a function Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-05-05 01:00 +0100
csiph-web