Results 1 to 5 of 5

Thread: Switch Content Script with php

  1. #1
    Join Date
    Nov 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Switch Content Script with php

    1) Script Title: Switch Content Script
    2) Script URL (on DD):http://www.dynamicdrive.com/dynamici...tchcontent.htm
    3) Describe problem:


    Im trying to use the Switch Content Script with a php funcion in it.


    I know why it doesnt work, but dont know how to make it work.

    here is what I have. I want to be able to click to show the php echo

    PHP Code:
    <h3 onClick="expandcontent(this, 'sc1')" style="cursor:hand; cursor:pointer"><span class="showstate"></span>Display more</h3>
    <div id="sc1" class="switchcontent"><?php echo $PHPfile->options_list(truetrue?></div>
    </td></tr>
    anyone have any ideas
    Last edited by rednimer; 11-13-2006 at 04:34 AM. Reason: noob, didnt read rules, slap

  2. #2
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Read the Rules before posting.

    Warning: Please post all Dynamic Drive Script Related Questions here


    One it's moved...

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format for asking a question.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  3. #3
    Join Date
    Nov 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    can you please move this DD scripts forum. THanks

  4. #4
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Add the ; in the php statement.

    Code:
    <?php echo $PHPfile->options_list(true, true); ?>
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  5. #5
    Join Date
    Nov 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have put in the ; but still no change.

    It puts the echo in from the time the page loads. I assume this is because php kinda ignores the html and does its own thing.

    I can put some test text to have it show, and that works, but the php echo just stays there.

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
  •