Reply to Javascript /CSS code accessing DOM objects introduced via PHP include

Your name:

Reply:


Posted by William van Zwanenberg on 09/25/06 02:31

Hi there,

I wonder if you guys can help.

I'm currently experiencing some coding problems what with trying to use PHP
and javascript in tandem.

What I'm ultimately trying to achieve is use Javascript to access the DOM
objects of any given page within the web site I'm building to dyanamically
resize any and all text elements. I have Javascript some code that works
perfectly when used in isolation via a flat XHTML page however it's when I try
to use that same code in PHP rendered pages where the content derives from a
PHP include, that problems arise and it just doesn't appear to work at all.

So as to explain this ina alittle more detail let me say that my website is
built around a 3 collumn format with a header and footer. With this 3
collumns, you have a left-hand navigation bar and a righ-hand navigation bar.
It is within the middle and largest collumn, that content is displayed.

At the moment, the XHTML for the header and footer is included via a PHP
include. The the 3 central collumns are established via a PHP template and it
is into the middle collum that content is dynamically inserted via yet another
PHP include. These includes either retrive content from a databse lookup of a
MySQL database or from a series of plain text files.

The Javascript code that I spoke of above and which I know works well when
used in flat XHTML pages, is included via the header PHP include code and is
contained within the <head> ... </head> tags. What I want to know is why, if
the Javascript is included in this way, do the functions included in this code
not access and therefore chnage the page elements if these page elements are
introduced via a PHP include?

I can see no obvious reason why this shouldn't work so if anyone has any
suggestions or advice on how to get this to work, I'd be very grateful

Please reply to: willvz@ntlworld.com

Many thanks.

Will

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация