Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #36216
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2019-03-28 05:39 -0700 |
| References | (7 earlier) <e0f3a3b5-58de-4869-b193-47869a004da7@googlegroups.com> <4174f740-c606-4cfa-ac98-625280b3b1c2@googlegroups.com> <f7adbaa1-15de-402a-959a-b48ca24fcf71@googlegroups.com> <99b20cec-164e-452f-aef0-ffe93207adf1@googlegroups.com> <08754e0a-a385-42aa-a3bd-58349d0a8eda@googlegroups.com> |
| Message-ID | <7fa7904f-b7ff-4fc2-8feb-00d6c8153f11@googlegroups.com> (permalink) |
| Subject | Re: Breaking up the HTML into logical blocks. |
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
Den torsdag 28 mars 2019 kl. 13:38:04 UTC+1 skrev Jonas Thörnvall:
> Den torsdag 28 mars 2019 kl. 13:20:05 UTC+1 skrev Jonas Thörnvall:
> > Den torsdag 28 mars 2019 kl. 13:14:04 UTC+1 skrev Jonas Thörnvall:
> > > Den torsdag 28 mars 2019 kl. 13:12:12 UTC+1 skrev Jonas Thörnvall:
> > > > Den torsdag 28 mars 2019 kl. 13:03:48 UTC+1 skrev Jonas Thörnvall:
> > > > > Den torsdag 28 mars 2019 kl. 12:49:50 UTC+1 skrev Julio Di Egidio:
> > > > > > On Thursday, 28 March 2019 11:20:20 UTC+1, Jonas Thörnvall wrote:
> > > > > >
> > > > > > > Thanks Julio finally something usefull
> > > > > >
> > > > > > I try and try, eventually you can suck my socks. :)
> > > > > >
> > > > > > > https://www.codereadability.com/constructing-html-with-templates/
> > > > > >
> > > > > > Of all the articles, couldn't you find anything worse than that?
> > > > > >
> > > > > > And I mean: besides that it ends up using just libraries, so good riddance
> > > > > > to learning anything at all, but the very idea of HTML (or CSS) hard-coded
> > > > > > into JS is just a NO NO, and good riddance to React and similar upside down
> > > > > > nonsense, too.
> > > > > >
> > > > > > Plain JS loading text or XML via AJAX and parsed if needed to HTML, that's it.
> > > > > >
> > > > > > Here is a basic approach where I am loading html fragments (just the html that
> > > > > > you need, not a full page, still give your template an html extension to work
> > > > > > with it in an editor) directly into some DIV or similar:
> > > > > >
> > > > > > function loadTemplate(templateUrl, onSuccess, onError)
> > > > > > {
> > > > > > var xhr = new XMLHttpRequest();
> > > > > >
> > > > > > xhr.onload = function ()
> > > > > > {
> > > > > > if (xhr.status === 200)
> > > > > > {
> > > > > > onSuccess(xhr.responseText);
> > > > > > }
> > > > > > else
> > > > > > {
> > > > > > onError(xhr.statusText);
> > > > > > }
> > > > > > };
> > > > > >
> > > > > > xhr.onerror = function ()
> > > > > > {
> > > > > > onError("Network Error");
> > > > > > };
> > > > > >
> > > > > > xhr.open("GET", templateUrl, true);
> > > > > >
> > > > > > xhr.responseType = "text";
> > > > > >
> > > > > > xhr.send(null);
> > > > > > }
> > > > > >
> > > > > > loadTemplate(templateUrl,
> > > > > > function (responseText)
> > > > > > {
> > > > > > target.innerHTML = responseText; // target is a DIV
> > > > > >
> > > > > > cont(); // calling a continuation, YMMV
> > > > > > },
> > > > > > function (statusText)
> > > > > > {
> > > > > > throw new $InvalidTemplateError(statusText);
> > > > > > });
> > > > > >
> > > > > > And now you can really thank me, as that's production-level code, just slightly
> > > > > > abridged for simplicity.
> > > > > >
> > > > > > > But a bit late, i ain't fucking going to change it now.
> > > > > >
> > > > > > Then another lesson: you will not fix it later, it's now or never...
> > > > > >
> > > > > > Have fun,
> > > > > >
> > > > > > Julio
> > > > >
> > > > > Very nice Julio, but can i ask you one thing why is those 15 lines of code hiding in an incomprehensible bracket structure needed.
> > > > >
> > > > > Afterall all we want to do is load a bit of text, are we going to blip-blop this one out of context like all the new Javascript syntax.
> > > > >
> > > > > Can you give me ****1**** good reason for ****why**** load.SubHTML(URL);
> > > > > is out of reach for the buttsniffing ENTP's?
> > > >
> > > > I mean it is not even an URL i try to load just a relative textblock for god sake, what the fuck is wrong with the people who implement the language. Yes i now there is an URL behind it when you download, but so it is for any img.
> > > >
> > > > And i have not fucking seen any fullpaths to relative image files.
> > > > Maybe this not even an Javascript issue?
> > > >
> > > > This should been done in HTML from start, it need subHTML that can be loaded by "URL" or local path?
> > > >
> > > > I have not seen the need for investigate the network when loading an http://image so i can not see the validity for it loading a textblock.
> > > >
> > > > The more i think about it the more sure i get there is something missing in HTML.
> > >
> > > <SUBHtml source="URL">Yeah this is where we load it!</SUBHtml>
> >
> > Oh wait a minute the one who invented HTML had it in mind, ***BUT SOME IDIOT*** DECIDED TO BREAK IT OUT FROM THE HTML PAGE!
> >
> > <FRAME SRC=""></FRAME>
> >
> > Who are the fucking idiot now that is an HTML tag, you fucking morons and it is intended to be used in HTML not outside.
>
> You see probably the one who invented the HTML had some insights in publishing using frames, and then they put a poor ENTP idiot onto implement it bwhahahahahh and this is how it ends up.
Back to the drawing board W3C it is not to late to change, do it now i know from experience if you do not do it know it will never be done bwhahahahhha
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-27 22:26 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 01:19 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 01:53 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 02:14 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-28 02:47 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 03:20 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-28 04:49 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 05:03 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 05:12 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 05:13 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 05:19 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 05:24 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 05:32 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 05:37 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 05:39 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-28 05:20 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 05:26 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 05:46 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 06:29 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 07:21 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 07:26 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 07:34 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 20:41 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 20:46 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 03:28 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-28 03:35 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-28 04:55 -0700
Re: Breaking up the HTML into logical blocks. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-03-29 09:11 +0100
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-29 02:14 -0700
Re: Breaking up the HTML into logical blocks. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-03-29 10:54 +0100
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-29 10:05 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 10:43 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-29 11:01 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-29 11:38 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 12:25 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 12:37 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-29 11:42 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 12:30 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-29 12:36 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 12:38 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 12:41 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-29 12:43 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 12:49 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 12:54 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-29 12:58 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 13:04 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-29 13:10 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 12:45 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-29 12:50 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 13:01 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-29 13:04 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 13:07 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-29 13:12 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-29 13:14 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 13:22 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 13:18 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-29 13:23 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 13:31 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-29 13:32 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 14:10 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 14:19 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 14:23 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 14:38 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 14:42 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-30 00:40 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-30 01:37 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-30 03:00 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-30 03:36 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-30 05:36 -0700
Re: Breaking up the HTML into logical blocks. dr.j.r.stockton@gmail.com - 2019-03-30 07:09 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-30 07:16 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-30 07:25 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-30 07:32 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-30 07:46 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-30 08:21 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-31 02:16 -0700
Re: Breaking up the HTML into logical blocks. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-03-31 11:26 +0200
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-31 07:07 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-30 07:26 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-30 00:51 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-30 01:21 -0700
Re: Breaking up the HTML into logical blocks. Julio Di Egidio <julio@diegidio.name> - 2019-03-30 01:31 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-30 02:34 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-30 02:46 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-30 02:58 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 02:22 -0700
Re: Breaking up the HTML into logical blocks. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-03-29 11:03 +0100
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 08:41 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 08:51 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 09:11 -0700
Re: Breaking up the HTML into logical blocks. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-03-29 17:18 +0100
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 10:31 -0700
Re: Breaking up the HTML into logical blocks. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-03-29 10:32 -0700
csiph-web