HTML or JavaScript

M

MartinRinehart

I can load a dialog by loading an HTML page or by constructing the
dialog with JavaScript.

What should I be thinking about when I look at this choice?
 
G

GArlington

I can load a dialog by loading an HTML page or by constructing the
dialog with JavaScript.

What should I be thinking about when I look at this choice?

It is your choice...
If you load HTML you will have an extra request to your web server to
deal with, if you use JavaScript your client will use some extra CPU
time...
 
R

rf

I can load a dialog by loading an HTML page or by constructing the
dialog with JavaScript.

What should I be thinking about when I look at this choice?

It is your choice...
If you load HTML you will have an extra request to your web server to
deal with, if you use JavaScript your client will use some extra CPU
time...

And ~10% of the clients will never see it.
 
D

dhtml

rf said:
It is your choice...
If you load HTML you will have an extra request to your web server to
deal with, if you use JavaScript your client will use some extra CPU
time...

Loading it in HTML does not necessitate an extra http req. Just put it
in the HTML. Requires less javascript to be downloaded.

....
<body>
<h1> Heading </h1>
<p> your content here </p>

<div id="panel">
panel content here.
</div>
</body>
....
 
T

Thomas 'PointedEars' Lahn

dhtml said:
Loading it in HTML does not necessitate an extra http req. Just put it
in the HTML. Requires less javascript to be downloaded.

...
<body>
<h1> Heading </h1>
<p> your content here </p>

<div id="panel">
panel content here.
</div>
</body>
...

You forgot to consider non-graphical user agents, including text browsers
(which usually do not support CSS) and search engines.


PointedEars
 
D

David Mark

You forgot to consider non-graphical user agents, including text browsers
(which usually do not support CSS) and search engines.

True enough, you should always test pages in Lynx (or a simulator) for
just this reason (most pages will read like the gibberish that they
are.)

However, the quoted example would be fine in this regard, so what was
forgotten?
 
T

Thomas 'PointedEars' Lahn

David said:
Thomas said:
dhtml said:
rf wrote:
:
On Oct 20, 10:45 am, (e-mail address removed) wrote:
I can load a dialog by loading an HTML page or by constructing the
dialog with JavaScript.
What should I be thinking about when I look at this choice?
[...]
Loading it in HTML does not necessitate an extra http req. Just put it
in the HTML. Requires less javascript to be downloaded.
...
<body>
<h1> Heading </h1>
<p> your content here </p>
<div id="panel">
panel content here.
</div>
</body>
...
You forgot to consider non-graphical user agents, including text browsers
(which usually do not support CSS) and search engines.

True enough, you should always test pages in Lynx (or a simulator) for
just this reason (most pages will read like the gibberish that they
are.)

However, the quoted example would be fine in this regard, [...]

Isn't it obvious that it would not be fine? The panel is a dialog that
should only be displayed when necessary (requested by a user action).
However, with this markup the "panel" will be displayed always (as a
paragraph) in e.g. Lynx.


PointedEars
 
D

David Mark

David said:
Thomas said:
dhtml wrote:
rf wrote:
:
On Oct 20, 10:45 am, (e-mail address removed) wrote:
I can load a dialog by loading an HTML page or by constructing the
dialog with JavaScript.
What should I be thinking about when I look at this choice?
[...]
Loading it in HTML does not necessitate an extra http req. Just put it
in the HTML. Requires less javascript to be downloaded.
...
<body>
<h1> Heading </h1>
<p> your content here </p>
<div id="panel">
  panel content here.
</div>
</body>
...
You forgot to consider non-graphical user agents, including text browsers
(which usually do not support CSS) and search engines.
True enough, you should always test pages in Lynx (or a simulator) for
just this reason (most pages will read like the gibberish that they
are.)
However, the quoted example would be fine in this regard, [...]

Isn't it obvious that it would not be fine?  The panel is a dialog that
No.

should only be displayed when necessary (requested by a user action).

Not necessarily. That may not be possible.
However, with this markup the "panel" will be displayed always (as a
paragraph) in e.g. Lynx.

Yes, Lynx does not support script. That's why the form will always be
there. So what?
 
T

Thomas 'PointedEars' Lahn

David said:
Thomas said:
David said:
Thomas 'PointedEars' Lahn wrote:
dhtml wrote:
rf wrote:
:
On Oct 20, 10:45 am, (e-mail address removed) wrote:
I can load a dialog by loading an HTML page or by constructing the
dialog with JavaScript.
What should I be thinking about when I look at this choice?
[...]
Loading it in HTML does not necessitate an extra http req. Just put it
in the HTML. Requires less javascript to be downloaded.
...
<body>
<h1> Heading </h1>
<p> your content here </p>
<div id="panel">
panel content here.
</div>
</body>
...
You forgot to consider non-graphical user agents, including text browsers
(which usually do not support CSS) and search engines.
True enough, you should always test pages in Lynx (or a simulator) for
just this reason (most pages will read like the gibberish that they
are.)
However, the quoted example would be fine in this regard, [...]
Isn't it obvious that it would not be fine? The panel is a dialog that

No.

Apparently not to you (yet).
Not necessarily. That may not be possible.

It is entirely possible if the dialog is not in the original HTML document.
Have you even read the thread?
Yes, Lynx does not support script. That's why the form will always be
there. So what?

So there would be a dialog (not a form) that does not belong there, which
would be a Bad Thing. Do you need to be guided from A to B to C now?


PointedEars
 
D

David Mark

David said:
Thomas said:
David Mark wrote:
Thomas 'PointedEars' Lahn wrote:
dhtml wrote:
rf wrote:
:
On Oct 20, 10:45 am, (e-mail address removed) wrote:
I can load a dialog by loading an HTML page or by constructing the
dialog with JavaScript.
What should I be thinking about when I look at this choice?
[...]
Loading it in HTML does not necessitate an extra http req. Just putit
in the HTML. Requires less javascript to be downloaded.
...
<body>
<h1> Heading </h1>
<p> your content here </p>
<div id="panel">
  panel content here.
</div>
</body>
...
You forgot to consider non-graphical user agents, including text browsers
(which usually do not support CSS) and search engines.
True enough, you should always test pages in Lynx (or a simulator) for
just this reason (most pages will read like the gibberish that they
are.)
However, the quoted example would be fine in this regard, [...]
Isn't it obvious that it would not be fine?  The panel is a dialog that

Apparently not to you (yet).
Not necessarily.  That may not be possible.

It is entirely possible if the dialog is not in the original HTML document.
 Have you even read the thread?

Of course I have. There is exactly one post by the OP and the problem
is outlined in one vague sentence. Perhaps you had a different
interpretation?
So there would be a dialog (not a form) that does not belong there, which

The word "dialog" has no real meaning here. A form in a div?
would be a Bad Thing.  Do you need to be guided from A to B to C now?

What sort of misplaced hubris is this? And perhaps you have never
seen a Web page with a form at the bottom. If possible (e.g. script,
CSS and any other needed features are available), the author may
choose to adjust the style to hide the form. It could then be
displayed later in response to a button press. The poor Lynx users
will just have to look at the form at the bottom. Again, so what?
 
T

Thomas 'PointedEars' Lahn

David said:
Thomas said:
David said:
Thomas 'PointedEars' Lahn wrote:
David Mark wrote:
Thomas 'PointedEars' Lahn wrote:
dhtml wrote:
rf wrote:
:
On Oct 20, 10:45 am, (e-mail address removed) wrote:
I can load a dialog by loading an HTML page or by constructing the
dialog with JavaScript.
What should I be thinking about when I look at this choice?
[...]
Loading it in HTML does not necessitate an extra http req. Just put it
in the HTML. Requires less javascript to be downloaded.
...
<body>
<h1> Heading </h1>
<p> your content here </p>
<div id="panel">
panel content here.
</div>
</body>
...
You forgot to consider non-graphical user agents, including text browsers
(which usually do not support CSS) and search engines.
True enough, you should always test pages in Lynx (or a simulator) for
just this reason (most pages will read like the gibberish that they
are.)
However, the quoted example would be fine in this regard, [...]
Isn't it obvious that it would not be fine? The panel is a dialog that
No.
Apparently not to you (yet).
should only be displayed when necessary (requested by a user action).
Not necessarily. That may not be possible.
It is entirely possible if the dialog is not in the original HTML document.
Have you even read the thread?

Of course I have. There is exactly one post by the OP and the problem
is outlined in one vague sentence. Perhaps you had a different
interpretation?

There is nothing that needs interpretation here. Apparently you do need to
be guided from A to B to C (and D). So be it.

(A) The OP was asking himself (and the participants of this newsgroup) what
would be the best way to load (read: display) a dialog. The
alternatives that he saw were a) loading a HTML document ("page") or b)
constructing the dialog with JavaScript (sic!).

(B) "GArlington" said that if the OP loaded a HTML document another request
to the Web server was necessary. "rf" also emphasized that a dialog
that only worked with "JavaScript" would not be interoperable.

However, "dhtml" suggested that it would be possible to avoid another
request if the dialog was included in the original HTML document.

(C) I pointed out that there are commonly used user agents that do not
support CSS (among them search engines) and therefore would not hide
the dialog (which cannot be shown if it is to be *loaded*, in the
common sense of the word). That would mean that the solution suggested
by "dhtml" would therefore not be a viable one.

(D) You jump in and say that despite the facts I pointed out the example
that included the dialog in the original HTML would be fine in that
regard, which is obviously a contradiction. When confronted with
an explanation why it is not fine, you insist and state that it may
not be possible to prevent the *form* from being there although it
is obvious that this is another contradiction; it was established
before that it is entirely possible to display the form or whatever
only on demand.
The word "dialog" has no real meaning here. A form in a div?

A dialog is merely a part of an application that requests input from a user,
usually triggered *on their request* (by a menu item, button or another
widget). That derives from the original meaning of the word in the sense
that the computer talks to the user (e.g. asks a question) and vice-versa
("OK" or "Yes" would mean "yes" or "acknowledged"). A dialog clearly does
not need to be a form.
would be a Bad Thing. Do you need to be guided from A to B to C now?

What sort of misplaced hubris is this? And perhaps you have never
seen a Web page with a form at the bottom. [...]

Apparently you are unable to place proper meaning on the word *d*i*a*l*o*g*
in a GUI. A sad thing for sure, and a reason for worries if you would
develop such applications, but your problem alone.


Score adjusted

PointedEars
 
D

David Mark

On Oct 23, 3:40 pm, Thomas 'PointedEars' Lahn <[email protected]>
wrote:
[snip]
A dialog is merely a part of an application that requests input from a user,
usually triggered *on their request* (by a menu item, button or another

Thanks, professor. The operative word is *usually*. Certainly not
even close to always (see below.)

[snip]
Apparently you are unable to place proper meaning on the word *d*i*a*l*o*g*

For example, the first thing most users see on running new software
(hint: like opening a Web page) is a registration *d*i*a*l*o*g*.

Idiot.
 
T

Thomas 'PointedEars' Lahn

David said:
Thomas 'PointedEars' Lahn wrote:
[snip]
A dialog is merely a part of an application that requests input from a user,
usually triggered *on their request* (by a menu item, button or another

Thanks, professor. The operative word is *usually*. Certainly not
even close to always (see below.)

[snip]
Apparently you are unable to place proper meaning on the word *d*i*a*l*o*g*

For example, the first thing most users see on running new software
(hint: like opening a Web page) is a registration *d*i*a*l*o*g*.

That is commonly called a registration *form*. Obviously _not_ what the OP
wants. He wants to *load* a *dialog* instead *from another HTML document*.

When unreasonable people run out of arguments, they can only but get personal.

<http://en.wikipedia.org/wiki/Dialog_box>


PointedEars
 
D

dhtml

David said:
What sort of misplaced hubris is this? And perhaps you have never
seen a Web page with a form at the bottom. If possible (e.g. script,
CSS and any other needed features are available), the author may
choose to adjust the style to hide the form. It could then be
displayed later in response to a button press. The poor Lynx users
will just have to look at the form at the bottom. Again, so what?

Putting it at the bottom would be a lot simpler than setting up XHR to
get the panel HTML.

For all we know, the OP is not deploying this on a public domain.

Garrett
 
R

Richard Cornford

On Oct 24, 8:35 am, dhtml wrote:
For all we know, the OP is not deploying this on a public
domain.

We do have the default assumption rule, where either we do know that
the OP is not deploying this on a public domain (as a result of being
told as much) or (in the absence of information) assume that it is.

Richard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,138
Messages
2,570,801
Members
47,348
Latest member
nethues

Latest Threads

Top