CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1

    One PHP function breaking innerHTML - Need Help

    I have tested this innerHTML deal with some php calls, and it works fine....except for on the one I need it to work on. I have to get this to work. This is one of the very last issues on the site and I need to launch immediately! Thanks!

    I am trying to recreate the functionality on this page in WordPress: http://iwearyourshirt.com/testimonials (click on the customers to see the content at the top of the page change)

    I am close, and it works with this code:

    Code:
    <?php $my_query = new WP_Query('cat=7');
        while ($my_query->have_posts()) : $my_query->the_post();
        $do_not_duplicate = $post->ID;
        ?>
        <div class="reviews-date">
        <?php the_date(); ?>
        </div>
        <a href="#self" onclick="document.getElementById('expansion').innerHTML = '<?php the_title() ?>';">This is an example</a>
        </div>
        <?php endwhile; ?>
    But when I try to add <?php the_content() ?> right after <?php the_title() ?> in the innerHTML portion the entire content is displayed, no links like they are supposed to be.

    The working example is up right now. I can put in the non-working example if you need me to. Thanks.

    The site: http://billboardfamily.com/our-reviews/

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: One PHP function breaking innerHTML - Need Help

    Its probably a quote mark issue. Have you checked what quotes are being outputted?
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3

    Re: One PHP function breaking innerHTML - Need Help

    I agree, that seems to be the issue....but, it is wordpress, so I do not know where in all those wordpress files the extra quote is being generated....

  4. #4
    Join Date
    May 2002
    Posts
    10,943

    Re: One PHP function breaking innerHTML - Need Help

    Do a "contains" search to find the files containing those functions.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  5. #5

    Re: One PHP function breaking innerHTML - Need Help

    crazy....it did not find anything

  6. #6
    Join Date
    May 2002
    Posts
    10,943

    Re: One PHP function breaking innerHTML - Need Help

    Make sure you're not looking for the closing parenthesis. PHP can have predefined parameters.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured