PDA

View Full Version : Dynamic Ajax content



gibby
04-18-2007, 08:16 PM
1) Script Title: Dynamic Ajax content

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm


3) Describe problem: Hi I an new and chinese so sorry first. I have working this script.
Now all links call html file in ajaxfiles folder no problem. same as the demo script I would like to call php file I have contact form.
please can you tell me what to do

this is the code in the main file


<a href="javascript:ajaxpage('ajaxfiles/about_contactus.html', 'rightcolumn');">Contact us</a>


this is the code in the html file about_contactus.html


<p align="justify"> <p align="justify"><?php include('testmailer/phMailer.php');php?></p>


i think i am doing something wrong that is very simple I see nothing :-(




Thank you very much
Gibby

gibby
04-19-2007, 06:20 PM
i have added some new information i hope it make it easy for someone to help me

thank you :D

thetestingsite
04-20-2007, 01:19 AM
Try changing the name of about_contactus.html to about_contactus.php.

Hope this helps.

gibby
04-20-2007, 03:28 AM
hi

if i do that i get this error :confused:



Warning: include(testmailer/phMailer.php) [function.include]: failed to open stream: No such file or directory in /home/correctm/public_html/testsite/ajaxfiles/about_contactus.php on line 12

Warning: include() [function.include]: Failed opening 'testmailer/phMailer.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/correctm/public_html/testsite/ajaxfiles/about_contactus.php on line 12


question -- it calls html page, can that page have php include ?
if not can it call just a normal php page? if so where do the php files need to be?

Thank you

thetestingsite
04-20-2007, 03:32 AM
You cannot include PHP code in an HTML document (with the extension .html, unless you have the MIME type set as application/x-httpd-php). The AJAX can call any type of web document (such as PHP, ASP, Perl, XML, HTML, etc) as long as the page exists on the server.

Hope this helps.

gibby
04-20-2007, 08:43 AM
thanks

where is that done?

and thanks again for the support