-
September 20th, 2010, 09:14 PM
#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/
-
September 21st, 2010, 12:53 PM
#2
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.
-
September 21st, 2010, 02:32 PM
#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....
-
September 21st, 2010, 03:09 PM
#4
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.
-
September 21st, 2010, 03:14 PM
#5
Re: One PHP function breaking innerHTML - Need Help
crazy....it did not find anything
-
September 22nd, 2010, 07:54 AM
#6
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|