mndasher
06-13-2009, 07:18 AM
I have used the script ajaxfilefetcher http://www.javascriptkit.com/script/script2/ajaxpagefetcher.shtml (http://www.javascriptkit.com/script/script2/ajaxpagefetcher.shtml) several times and it has worked quite nicely with text files.
Where I have a problem now, is when the file being called to fill the div is a php file. It is kind of dawning on me that this may not work. Anyhow continuing...
The php file contains a MySQL query which works fine when run as an independent file. -- I am thinking as I am typing.. that the page has already been served up by the php engine, and it won't process a embedded php file within a page that has already been served up.
So that brings me to a new question. Is there a simple ajax script that can just make a MySQL query and deliver the contents of that query to the page in question on the fly. It appears PHP wont work unless I reload the whole page.
Where I have a problem now, is when the file being called to fill the div is a php file. It is kind of dawning on me that this may not work. Anyhow continuing...
The php file contains a MySQL query which works fine when run as an independent file. -- I am thinking as I am typing.. that the page has already been served up by the php engine, and it won't process a embedded php file within a page that has already been served up.
So that brings me to a new question. Is there a simple ajax script that can just make a MySQL query and deliver the contents of that query to the page in question on the fly. It appears PHP wont work unless I reload the whole page.