473,781 Members | 2,491 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTML or JavaScript

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?
Oct 20 '08 #1
14 1681
On Oct 20, 10:45*am, MartinRineh...@ gmail.com 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?
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...
Oct 20 '08 #2
rf

"GArlington " <ga********@tis cali.co.ukwrote in message
news:9f******** *************** ***********@m73 g2000hsh.google groups.com...
On Oct 20, 10:45 am, MartinRineh...@ gmail.com 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?
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.
Oct 20 '08 #3
rf wrote:
"GArlington " <ga********@tis cali.co.ukwrote in message
news:9f******** *************** ***********@m73 g2000hsh.google groups.com...
On Oct 20, 10:45 am, MartinRineh...@ gmail.com 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?

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>
<h1Heading </h1>
<pyour content here </p>

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

--
comp.lang.javas cript FAQ <URL: http://jibbering.com/faq/ >
Oct 21 '08 #4
dhtml wrote:
rf wrote:
>"GArlington " wrote:
On Oct 20, 10:45 am, MartinRineh...@ gmail.com 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?
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>
<h1Heading </h1>
<pyour 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
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Oct 21 '08 #5
On Oct 21, 1:27*pm, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
wrote:
dhtml wrote:
rf wrote:
"GArlington " wrote:
On Oct 20, 10:45 am, MartinRineh...@ gmail.com 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?
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>
<h1Heading </h1>
<pyour 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, so what was
forgotten?
Oct 22 '08 #6
David Mark wrote:
Thomas 'PointedEars' Lahn wrote:
>dhtml wrote:
>>rf wrote:
"GArlingto n" wrote:
On Oct 20, 10:45 am, MartinRineh...@ gmail.com 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>
<h1Heading </h1>
<pyour 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
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Oct 22 '08 #7
On Oct 22, 5:21*pm, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
wrote:
David Mark wrote:
Thomas 'PointedEars' Lahn wrote:
dhtml wrote:
rf wrote:
"GArlington " wrote:
On Oct 20, 10:45 am, MartinRineh...@ gmail.com 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>
<h1Heading </h1>
<pyour 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?
Oct 22 '08 #8
David Mark wrote:
Thomas 'PointedEars' Lahn wrote:
>David Mark wrote:
>>Thomas 'PointedEars' Lahn wrote:
dhtml wrote:
rf wrote:
>"GArlingto n" wrote:
>On Oct 20, 10:45 am, MartinRineh...@ gmail.com 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>
<h1Headin g </h1>
<pyour 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?
>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?
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
Oct 22 '08 #9
On Oct 22, 6:20*pm, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
wrote:
David Mark wrote:
Thomas 'PointedEars' Lahn wrote:
David Mark wrote:
Thomas 'PointedEars' Lahn wrote:
dhtml wrote:
rf wrote:
"GArlington " wrote:
On Oct 20, 10:45 am, MartinRineh...@ gmail.com 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>
<h1Heading </h1>
<pyour 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?
>
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?

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?
Oct 22 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2716
by: quikquic | last post by:
Suppose I download a html file with javascript in it, for example, <html> <body> <script language="JavaScript"> document.write("Hello"); </script> </body> </html>
7
5042
by: quikquic | last post by:
If there is javascript in a html file, for example, <html> <body> <script language="JavaScript"> document.write("Hello"); </script> </body> </html>
9
2900
by: Robby Bankston | last post by:
I'm working on some code and am running into brick walls. I'm trying to write out Javascript with Javascript and I've read the clj Meta FAQ and didn't see the answer, read many similar posts (with no luck though), and searched through the IRT.ORG Faqs (www.irt.org/script/script.htm). The Javascript is designed to open an popup window and then inside that window call another script which will resize that window. There may be another...
6
5266
by: Jon Davis | last post by:
I recently learned how to do an <OBJECT> alternative to <IFRAME> in current browsers using: <object id="extendedhtml" type="text/html" data="otherpage.html" width="250" height="400"></object> My question is how do I access the document DOM of this object in Javascript? For example, "alert(extendedhtml.innerHTML);" doesn't work and produces an unknown error. I'd like to both read and write to the document's body element's innerHTML...
2
3059
by: Jake Barnes | last post by:
Using javascript closures to create singletons to ensure the survival of a reference to an HTML block when removeChild() may remove the last reference to the block and thus destory the block is what I'm hoping to achieve. I've never before had to use Javascript closures, but now I do, so I'm making an effort to understand them. I've been giving this essay a re-read: http://jibbering.com/faq/faq_notes/closures.html
10
3480
by: paulie | last post by:
Hi, I have been experiencing an issue when trying to use AJAX to reload a DIV area using a timer of 2000ms, which contains a html page with another DIV and javascript. Scenario ------------- I have perl script which simply runs a ps on a Solaris server and generates a static html page with all of the code perfectly and this html page works fine when viewing it statically or with a META REFRESH header tag. The idea is to give the user...
1
16974
by: since | last post by:
I figured I would post my solution to the following. Resizable column tables. Search and replace values in a table. (IE only) Scrollable tables. Sortable tables. It is based on a lot examples I found on the web. Works in IE and mozilla. http://www.imaputz.com/cssStuff/bigFourVersion.html
7
3616
by: imtmub | last post by:
I have a page, Head tag Contains many Scripts and style sheet for Menu and Page. This code working fine and displaying menus and page as i wanted. Check this page for reference. http://www.marco.com.cn/web-content/marco_re10.html -------------------------------------------------------------- <head> <!-- InstanceBeginEditable name="doctitle" --> <title>Marco</title> <!-- InstanceEndEditable -->
42
8967
by: Santander | last post by:
how to decode HTML pages encoded like this: http://www.long2consulting.com/seeinaction2008/Simplicity_Beach_table/index.htm Is there script that will do this automatically and generate normal fully readable HTML? Santander
3
3911
by: happyse27 | last post by:
Hi All, I am creating the perl script using html form(with embedded javascript inside). When using this html form with javascript alone, it works where the form validation will pop up javascript windows to say the field is not keyed into properly. However, when i convert this html(with javascript inside) into perl script, the perl script did not validate when i keyed incorrect data in the form and it straight away executed perl script...
0
9639
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10308
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10143
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10076
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8964
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5507
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2870
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.