Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter friggart

    (@friggart)

    Hi

    Thanks again, but unfortunately no joy. It would not work at all initially, so I made it a php variable first which helped, but only added the /n tags at the end of each line. But the /n tags were visable. Here is what I tried.

    <script type="application/javascript">//<![CDATA[
    
    /*Example message arrays for the two demo scrollers*/
    
    <?php 
    
    switch(date('N')) {
    case 1: ?>
    <?php query_posts('p=69'); ?>
    <?php break;
    case 2: ?>
    <?php query_posts('p=71'); ?>
    <?php break;
    case 3: ?>
    <?php query_posts('p=73'); ?>
    <?php break;
    case 4: ?>
    <?php query_posts('p=75'); ?>
    <?php break;
    case 5: ?>
    <?php query_posts('p=77'); ?>
    <?php break;
    case 6: ?>
    <?php query_posts('p=79'); ?>
    <?php break;
    case 7: ?>
    <?php query_posts('cat=7'); ?>
    <?php break;
    default:
    } ?>
    
    var pausecontent2=new Array()
     <?php
    $count = 0;
    while (have_posts()) : the_post(); ?>
    
    <?php
    $displayhtml = esc_js( $post->post_content ); ?>
    
    pausecontent2[<?php echo $count; ?>]='<?php echo addslashes_gpc( $displayhtml ); ?>'
    <?php $count++; endwhile; ?>
    
    new pausescroller(pausecontent2, "pscroller2", "someclass", 2000)
    //]]></script>

    Many Thanks

    Thread Starter friggart

    (@friggart)

    Thanks Jackson, worked great with a little fiddling, and for the pastebin tip. Its doing exactly what I want, but one thing. I am not sure if its even possible but the JS is showing the full code instead of formatting it. Example Line:

    I want this:

    CLASS 1
    9.00am – 10.00am

    But I am getting this:

    <strong>CLASS 1</strong>9.00am - 10.00am

    Do you know if it is even possible. I have tried creating a new variable first, then calling the variable instead of the direct code, but that did the same thing. That said, i am very happy that it is now working at least so thanks!

Viewing 2 replies - 1 through 2 (of 2 total)