Click here to get back home

Self-modifying HTML code?

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Self-modifying HTML code? AES 08-17-2006
Get Chitika Premium
Posted by AES on August 17, 2006, 11:53 am
Please log in for more thread options


Can an HTML web page dynamically modify its own code?

(without resort to Java or any other non-HTML complexities)

That is, is there any provision in HTML such that a single
"Next" button on a main or index.html page will:

a) Change an image displayed on that page (say Picture_1.jpg)
to the next image in a sequence (say Picture_2.jpg), AND

b) "Reprogram" the Next button so that when its clicked again
it will replace Picture_2.jpg with Picture_3.jpg, and so on
thru a sequence of images.

Result could be a "one page slide show" with

* index.html and Picture_1, Picture_2, etc, being the ONLY files on
the web site; no other intermediate "linking" HTML pages.

* Picture_1, Picture_2, etc, being pure JPEG files -- no hidden HTML.

* Any individual picture immediately replaceable with newer version,
with no recoding

* Identical index pages will work with different picture sequences
provided each index page and sequence are in different folders

* No "gallery" with thumbnails of individual slides needed

This is not possible in pure HTML . . right?

Posted by Jim Moe on August 17, 2006, 12:03 pm
Please log in for more thread options


AES wrote:
> Can an HTML web page dynamically modify its own code?
>
> (without resort to Java or any other non-HTML complexities)
>
No.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)

Posted by Harlan Messinger on August 17, 2006, 12:16 pm
Please log in for more thread options


AES wrote:
> Can an HTML web page dynamically modify its own code?
>
> (without resort to Java or any other non-HTML complexities)

HTML doesn't do anything dynamically. HTML only describes content. It
contains no instructions.

Posted by Chris Morris on August 17, 2006, 12:34 pm
Please log in for more thread options


> Can an HTML web page dynamically modify its own code?

No.

> This is not possible in pure HTML . . right?

No, but add a bit of CSS and it more-or-less works. Sort of. On a good
day.
http://www.dur.ac.uk/c.i.morris/htmlslides.html

Works in Gecko-based browsers, doesn't work in IE or Opera. I haven't
tested anything else. Since it requires styling of form controls and
uses the <button> element, it's perhaps not surprising it's incredibly
unreliable (and with serious accessibility problems even when it does
work).

You'd be better off with a server-side image gallery, optionally (and
it probably isn't worth it) with support for Javascript to let you
avoid full-page reloads.

--
Chris

Posted by Andy Dingley on August 17, 2006, 1:07 pm
Please log in for more thread options



AES wrote:

> Can an HTML web page dynamically modify its own code?

No, you'll need JavaScript and a DOM.

Also don't think about "modifying its own code". The HTML code is
supplied from the server to the client by HTTP, then parsed into the
DOM and rendered onto the display. After this the code should be
thought of as not being of further interest. Instead you should modify
the DOM, using a different set of JavaScript methods.

You _can_ "modify the HTML code" using document.write() and similar
JavaScript functions. This is an obsolete technique though and causes
all sorts of problems, particularly if you want to work with XMl in the
future. So don't learn to do it this way, learn to do it through the
DOM.


Similar ThreadsPosted
Share common HTML code among different HTML files? May 14, 2005, 11:05 pm
changes in HTML code are ignored by the browser (IE6) October 7, 2004, 11:56 am
Showing html code in a web page April 3, 2005, 5:56 pm
html email displays as code June 27, 2007, 4:19 pm
Re: Make HTML code show up on the web April 15, 2008, 8:06 am
html validation - html code help February 3, 2006, 12:50 pm
how to set browser window attributes in this HTML code? March 21, 2005, 9:12 am
Translating foreign characters to HTML code June 25, 2005, 2:35 pm
Control Browser Parameters with HTML code? August 26, 2005, 9:14 pm
Translating foreign text into html code - help October 25, 2005, 4:36 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap