Results 1 to 6 of 6

Thread: Dynamic Ajax content

  1. #1
    Join Date
    Apr 2007
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Dynamic Ajax content

    1) Script Title: Dynamic Ajax content

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...jaxcontent.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
    Code:
    <a href="javascript:ajaxpage('ajaxfiles/about_contactus.html', 'rightcolumn');">Contact us</a>
    this is the code in the html file about_contactus.html
    Code:
    <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
    Last edited by gibby; 04-19-2007 at 06:18 PM.

  2. #2
    Join Date
    Apr 2007
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i have added some new information i hope it make it easy for someone to help me

    thank you

  3. #3
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Try changing the name of about_contactus.html to about_contactus.php.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  4. #4
    Join Date
    Apr 2007
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hi

    if i do that i get this error

    Code:
    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

  5. #5
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    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.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  6. #6
    Join Date
    Apr 2007
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks

    where is that done?

    and thanks again for the support

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •