Re: Dynamic HTML Creation

From: Date: Sat, 28 Aug 2004 19:30:48 +0000
Subject: Re: Dynamic HTML Creation
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-195025@lists.php.net to get a copy of this message
"Justin Patrin" <papercrane@gmail.com> wrote in message news:432beae04082723585d871c23@mail.gmail.com... > On Fri, 27 Aug 2004 23:17:29 -0700, Sam Hobbs <socalsam@bigfoot.com> wrote: > > Is it possible to use the DOM to add (HTML) elements to a page at the time > > the page is being shown? The HTML and VBScript shown below is a simplified > > version of what I need to do but of course I need to do it in PHP. Since PHP > > is server-side (right?) perhaps it is not possible. > > > > You're right, it's not possible. You'd have to create the whole page > with DOM and output it at the end. > > You may be able to use DOM to make a specific piece and inject it.... > You could always just use JavaScript to inject things as wel. Thank you. You understand the question. I am not sure of the details of what you were suggesting, but that is not important. The general idea is probably what I will do. This is for osCommerce, which is a shopping cart system written in PHP. Many of it's pages (the HTML) are not modifiable directly using a WYSIWYG editor, which make the content difficult to modify, especially for non-technical people. So what I can do is to make a page that is stored as a HTML page and then in a separate PHP script add stuff (in this situation, it is left and/or right menu columns) using the DOM. Since the system is written using PHP, this improvement should also use PHP. I think PHP will do quite well using it in this manner yet the system (osCommerce) can be easier to use.

« previous php.general (#195025) next »