How to fill my collapsible panels with dynamic content from PHP scripts?

Hi people,
I'm trying to generate dynamically generated content in a
Spry collapsible panel. Previously I've generated PHP files that as
an output generates a dynamic table with the data I want to show. I
figured it would be possible to use an php include option to
generate this table in a content section of a Spry collapsible
panel. However, when I do this the collapsible panels appear to
join and when panel1 is clicked all tables close instead of only
panel 1 and all tables are put benath each other without putting it
in each seperate panel. But when i replace the file with only the
text "content" it works fine. Do i maybe have to add some kind of
command at the end of my php file to make it look like the
"content"-text or is this not the problem?
I've been looking for the answer now for a couple of weeks on
various forums and nothing seemed to work for me. Can please
somebody help me out?
Greets,
Damian
The code in its non working form:
<head>
<!--Link the CSS style sheet that styles the Collapsible
Panel-->
<link href="SpryAssets/SpryCollapsiblePanel.css"
rel="stylesheet"
type="text/css" />
<!--Link the Spry Collapsible Panel JavaScript
library-->
<script src="SpryAssets/SpryCollapsiblePanel.js"
type="text/javascript"></script>
</head>
<body>
<!--Create the Collapsible Panel widget and assign
classes to each element-->
<div id="CollapsiblePanel1" class="CollapsiblePanel1">
<div class="CollapsiblePanelTab">Tab</div>
<div class="CollapsiblePanelContent"><?php
include('details_books.php');?></div>
</div>
<div id="CollapsiblePanel2" class="CollapsiblePanel2">
<div class="CollapsiblePanelTab">Tab</div>
<div class="CollapsiblePanelContent"><?php
include('details_authors.php');?></div>
</div>
<!--Initialize the Collapsible Panel widget object-->
<script type="text/javascript">
var CollapsiblePanel1 = new
Spry.Widget.CollapsiblePanel("CollapsiblePanel1");
</script>
<script type="text/javascript">
var CollapsiblePanel2 = new
Spry.Widget.CollapsiblePanel("CollapsiblePanel2");
</script>
</body>

you need to save the page as a php page (.php) It works
fine

Similar Messages

  • Dynamic xml from php script throws error: #1088 or #1085

    Hi,
    I'm importing xml formatted data from mysql via php script:
    [code]
    <?php
    require_once('require.php');
    $result = mysql_query("SELECT * FROM `songs`");
    if($result)
        header ("Content-Type: text/xml");
        echo"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
        echo"<songComments>\n";
        while ($row = mysql_fetch_array($result))
            echo"<testimonial>\n";
            echo"<songComment>" . $row['title'] . "</songComment>\n";
            echo"</testimonial>\n";
        echo"</songComments>\n";
    ?>
    [/code]
    In one of my flash projects it's working just fine. But in the new one that I just sterted not anymore. And i have no idea why. I get this errors:
    TypeError: Error #1085: The element type "songComments\n" must be terminated by the matching end-tag "</songComments\n>".
    or:
    TypeError: Error #1088: The markup in the document following the root element must be well-formed.
    When I output that php into txt file and loaded in flash everything is fine, but not from php script directly.
    Could it have something to do with that I'm testing that mysql locally on my computer using WAMP ? Previous project got all data from mysql from server.

    Ho could I trace what flash sees?
    var url:URLLoader = new URLLoader();
    url.addEventListener(Event.COMPLETE, xmlLoaded);
    url.load(new URLRequest("getDataFromDB.php"));
    private function xmlLoaded(event:Event):void {
                myXML = new XML(event.target.data);
                trace(myXML);
    I  got rid of that \n everywhere or move them around  and it's still the same error 1088 or 1085

  • How do I make a hyperlink with dynamic data from a php data base table?

    Level - Dreamweaver infrequent user
    I have a standard master-detail couple of pages using MySQL and PHP. This function is working correctly. One of the data items on the Details page contains the name of a PDF document (including the .pdf suffix). The PDFs are stored in the PDFs library under the Site Root. I am wanting the ability of the page user to look at the associated PDF. Keeping it as simple as possible I just set up a text field 'View Report' followed by the Dynamic Text for the document name. I tried defining the Link Properties with the PDFs library name (plus the root level) followed by the code I thought it needed to identify the selected PDF document ( <? php echo $row_rslivesDetail['ReportLink']; ?> ). The first part is correct because when the code failed I changed it to a fixed PDF document and that worked. I've tried various combinations but not been successful. Can someone please suggest what I'm doing wrong with the code.
    Regards
    Cliff

    Do the PDFs actually reside in your MySql database or are they just in a folder on your server?
    To parse files from a folder, you could use something like this:
    <h2>PDF Files</h2>
    <?php
    class SortingIterator implements IteratorAggregate
    private $iterator = null;
    public function __construct(Traversable $iterator, $callback)
    if (!is_callable($callback)) {
    throw new InvalidArgumentException('Given callback is not callable!');
    $array = iterator_to_array($iterator);
    usort($array, $callback);
    $this->iterator = new ArrayIterator($array);
    public function getIterator()
    return $this->iterator;
    ?>
    <!--results-->
    <h3>2014</h3>
    <?php
    function mysort($a, $b)
    return $a->getPathname() > $b->getPathname();
    $item = new SortingIterator(new RecursiveIteratorIterator(new RecursiveDirectoryIterator('pdfs/2014/')), 'mysort');
    foreach ($item as $file) {
    echo '<li><a href="' . $file . '">' . $file->getFilename() . '</a> - '. round( $file->getSize() / 1052) . '  KB </li>';
    ?>
    </ul>
    In my example above, pdfs is my main folder and 2014 is my sub-folder. 
    Results echo inside a list with each file name hyperlinked.  See screenshot.
    Nancy O.

  • Panel with dynamic form

    I need to create panels with dynamic forms. Why does my application will have various forms and if I have to create a lot of forms it will take too long to complete my application.
    Can anyone help me?

    So my idea is as follows ...
    I need to create various forms, actually I wanted to create a scheme where the forms to adopt the characteristics defined by me.
    <s:Panel width="350">
                <mxml:CustomForm dataConfig="{dataConfig1}" width="100%" />
    </ S: Panel>
    Yo I'm adding the inputbox, LABES and buttons on the panel through the
    dataConfig1 = new ArrayCollection ([
                        (Label: 'Name', message: 'Invalid name', validateType 'noblank', id: 'name', text: 'Pedro Claudio', required: true),
                        (Label: 'Mail', message: 'Invalid Email' validateType: 'email', id: 'email', text:'', required: true)
    I wonder if this is the easiest way to create the forms?
    How does this business of the panels child?

  • How do I fill an Excel spreadsheet with the contents of a DataTable? (C#, OleDb)

    The following fills a DataTable with the contents of an Excel spreadsheet.
        oledbCmd.CommandText = "SELECT * FROM [" + stSheetName + "$]";
        DataTable dtDataTable = new DataTable();
        using (OleDbDataAdapter oledbAdapter = new OleDbDataAdapter(oledbCmd))
        oledbAdapter.Fill(dtDataTable);
    How do I fill an Excel spreadsheet with the contents of a DataTable?
    bhs67

    You can try this Excel library, it can help u to
    export datatable to excel to Database.
    After add the reference to your project ,add the following code:
    private void button1_Click(object sender, EventArgs e)
    //connect database
    OleDbConnection connection = new OleDbConnection();
    connection.ConnectionString @"Provider=""Microsoft.Jet.OLEDB.4.0"";Data Source=""demo.mdb"";User Id=;Password="
    OleDbCommand command = new OleDbCommand();
    command.CommandText = "select * from parts";
    DataSet dataSet = new System.Data.DataSet();
    OleDbDataAdapter dataAdapter = new OleDbDataAdapter(command.CommandText,connection);
    dataAdapter.Fill(dataSet);
    DataTable t = dataSet.Tables[0];
    //export datatable to excel
    Workbook book = new Workbook();
    Worksheet sheet = book.Worksheets[0];
    sheet.InsertDataTable(t, true, 1, 1);
    book.SaveToFile("insertTableToExcel.xls");
    System.Diagnostics.Process.Start("insertTableToExcel.xls");
    http://www.e-iceblue.com/Tutorials/Spire.XLS/Spire.XLS-Program-Guide/Data-Export-/Import-Export-Datatable-to-Excel-from-Database.html

  • How do we create a panel with a title on it

    How do we create a panel with a title on it (something like the titled border in java swing)

    Thanks John,
    But, I already have a panel box with many panel form layouts inside and would like to have a title on one of the panel form layouts. So, a panel box isn't the one I am looking for.
    More like the titled border shown in here [http://java.sun.com/docs/books/tutorial/uiswing/components/border.html#demo]
    thanks again
    Anwar

  • How do i transform a layer with maintain aspect ratio through scripting in Photoshop?

    Hi,
         How do i transform a layer with maintain aspect ratio through scripting in Photoshop? I am expecting your reply.
    thanks,
    Rajiv.s

    I don't think your talking apples to apples.  First I do not know of any Maintain Aspect Ratio icon in Photoshop. The only icon I think associated with transform is the anchor point icon in the option bar for transform. I think you may referring to the constrain check box in the image size dialog which you can check when resample is checked. Image size effect all layers in the document and the documents canvas size. The document canvas size will be changed to the values in the images size dialog and all layers will be transformed by percentage the canvas was changes while maintaining the layers position over the canvas and the layers I think may be cropped so only pixels over the canvas remain.
    I do not know if you know that layers can be any size and have aspect ratios different then the documents canvas.
    In your case it sounds like your describing a template that has a canvas size that is 2000px wide be 3000px high a 2:3 portrait aspect ratio.  Your image file has a landscape aspect. If you place that image into your template place would by default transform the image so the image would fit within the 2000px by 3000px canvas size there would be a white border top and bottom.  You could transform that smart object layer to it actual pixels size activeDocument.activeLayer.resize(100,100, AnchorPosition.MIDDLECENTER); then calculate the size you want to transform its height to. By retrieving the canvas size and the layers boundaries. Divide the canvas height pixel size by the layers pixel height size should give you the percentage you need to use. Make sure you set the ruler units to pixels so your working with pixel values for the canvas and layer size values. The resulting layer will be larger then canvas size keeping the anchor point centered will result in the canvas size masking off both sides.  In effect cropping you landscape to a portrait.  Note cropping a image from one orientation to the other changes the composition drastically.
    If your trying to make a composit like collage you may want to look at my Photoshop Collage Toolkit it will fit images to fill a 2000px by 3000px area http://www.mouseprints.net/old/dpr/PhotoCollageToolkit.html
    You could also do centered 2:3 crop that is resized to a 3000px

  • Is there a way to create a PDF form that ANYONE can fill out and SAVE with their content?

    Is there a way to create a PDF form that ANYONE can fill out and SAVE with their content? By anyone, I mean someone who can download and use the free Adobe Reader, on either a Mac or PC. I have Acrobat Pro, and would like to be able to create forms that can not only be filled out and printed, but saved and emailed, which is not an option with the forms I have created to date. They can be filled out, but not saved, with Adobe Reader.
    TIA,
    Nancy

    To do what Dave indicated you need to do, it depends on what version of Acrobat you have:
    Acrobat 8: Advanced > Enable Usage Rights in Adobe Reader
    Acrobat 9: Advanced > Extend Features in Adobe Reader
    Acrobat 10: File > Save As > Reader Extended PDF > Enable Additional Features
    Acrobat 11: File > Save as Other > Reader Extended PDF > Enable More Tools (includes form fill-in & save)
    I wonder what it will be next time?

  • How to use Two main windows with in a page in script ?

    Hi any body explain me...
    How to use Two main windows with in a page in script ?
    with  header data in one main window,
    & Item data in other main window.

    HI..,
    u need to go for <b>SPLITTING THE MAIN WINDOW</b> !!!
    Main windows in page windows allow you to format text in multiple columns. Define an area in the page window, in which to position the main windows.
    Here is the procedure !!
    -->Create a page window and assign it to a page.
    Choose <b>Edit --> Main windows</b>.
    A dialog box appears.
    -->Enter values in the fields <b>Area width</b> and A<b>rea height</b> in accordance with the input guidelines for main windows.
    -->Enter values in the fields <b>Spacing</b> and Number in the <b>Horizontal group</b> if you want to use multiple columns. You can ignore the fields in the Vertical group.
    Determine how many columns and line areas are required for label printing. Then enter the corresponding values in the fields in the <b>Horizontal and Vertical groups</b>.
    -->The value in the field Left margin varies from main window to main window if multiple columns are used. The following applies:
    <b>
    Left margin of current column + Window width + Horizontal spacing = Left margin of next column</b>
    In label printing, the field Upper margin also varies from main window to main window:
    <b>
      Upper margin of current main window +  Window height + Vertical spacing = Upper margin of next main window</b>
    -->Enter a value in the field Start position.
    This is a counter. Enter a starting value which is equal to or greater than 1.
    -->The main windows are added to the list.
    -->Save your form.
    reward if it helps u...
    sai ramesh

  • How do I repopulate my maps with red pins from my bookmarks?

    How can I repopulate my map with red pins from bookmarks? From Bookmarks I can drop one pin at a time which is useless. I need all of my pins back on the map.

    Suggest that you take a look at the excellent resource provided by Time Capule / Time Machine guru Pondini.
    http://web.me.com/pondini/Time_Machine/FAQ.html
    See # 14
    If you are not comfortable with this,I  would also suggest that you consider havng a qualified Apple repair shop perform this for you.

  • Create Portal Page Design with Dynamic content in Moss2007(without using Visual Studio)

    Hi All,
    I am facing a issue while designing a page in MOSS 2007. I can't use custom code as the client doesn't want it to be used.
    The page is with dynamic content coming from sharepoint lists and picture library. I tried using SharePoint Listview after adding zones as per my page design..but was unsuccessful because I am unable to change its design and css styles in its xslt view.
    Plesae help me to find any alternative so that I can easily style my page with the dynamic content. Is there any way using Content editor webparts? Can we get List data in Content editor html as this can be easily styled. I googled and tried it by using javascript
    and jquery but again unsuccessful.
    Please help me with some solution.
    Thanks..!!

    I recommend your repost this in the WebLogic Portal forum.
    WebLogic Portal

  • Indesign : how to move a rectangle object with his content ?

    hi
    i develop an indesign extension with flash builder and cs extension builder 2.
    when I move a rectangle object containing an image with the geometricBounds property the image does not move and is not visible anymore ...
    how to move a rectangle object with his content ?
    thanks
    Simon

    Use rectangle.move()

  • I purchased a new computer, how do i transfer all of my itunes content from the old computer to the new one with out loosing songs, apps, pics ...ect

    i purchased a new computer, how do i transfer all of my itunes content from the old computer to the new one with out loosing songs, apps, pics ...ect

    Copy the entire iTunes folder from the old computer to the new computer to move iTunes content.
    As for pictures, copy them from where there are on the old computer to the new computer... this has nothing to do with iTunes.
    Alternatively, if both computers are Windows based, use the Windows Easy File Transfer Utility to move everything.

  • How to export All computer list with operating system from AD and all attributes like disable or enable and OU location also?

    how to export All computer list with operating system from AD and all attributes like disable or enable and OU location also?
    I have tried with dsquery below but status is not showing there.
    dsquery * -filter "(objectCategory=computer)" -attr name operatingSystem

    last logon user name - not really stored (or lined) with computer object.  However, you can get this info during the logon process or from the computer.  Here is method:
    http://portal.sivarajan.com/2010/07/user-profile-and-os-info-powershell.html
    Santhosh Sivarajan | Houston, TX | www.sivarajan.com
    ITIL,MCITP,MCTS,MCSE (W2K3/W2K/NT4),MCSA(W2K3/W2K/MSG),Network+,CCNA
    Windows Server 2012 Book - Migrating from 2008 to Windows Server 2012
    Blogs: Blogs
    Twitter: Twitter
    LinkedIn: LinkedIn
    Facebook: Facebook
    Microsoft Virtual Academy:
    Microsoft Virtual Academy
    This posting is provided AS IS with no warranties, and confers no rights.

  • How do I link iCloud up with my stuff from my iPhone to appear on my iPad. Through both devices iCloud APPS are all switched to "on"  Do I have to click the storage and backup icon or no?

    How do I link iCloud up with my stuff from my iPhone to appear on my iPad. Through both devices iCloud APPS are all switched to "on"
    Do I have to click the storage and backup icon or no?

    Welcome to the Apple Community.
    What exactly do you mean by your stuff, what type of documents are you talking about.

Maybe you are looking for

  • Adobe Photoshop CS5 Extended Installation Problem

    I tried installing Adobe Photoshop CS5 Extended from the CD on Mac OS X Version 10.6.8 but installer kept unexpectedly quitting. Has anyone else experienced this as well, if so how did you fix it? Thanks!

  • Outlook 2013 will not start up

    Outlook 2013 Will not start. Get the following message: "Cannot start Microsoft Outlook.  Cannot open the Outlook window.  The set of folders cannot be opened.  The information store could not be opened." We have Microsoft Office 365 Home Premium edi

  • Trace Files and Deadlocks

    Hi, I've gotten a bunch of deadlocks in 8.1.7 and I'd like to be able to make use of the trace files, but the files are really cryptic and I can't find any documentation anywhere that explains how to read them. Moreover, I can't find any software tha

  • TS5181 ERROR=  "STATION UNAVAILABLE" "my_station_name" is currently unavailable. Try again later.

    I started receiving this error on my APPLE TV when trying to access a station I created in ITunes Radio.                           STATION UNAVAILABLE "station_name" is currently unavailable. Try again later. Also, I cannot access the same station on

  • Replacing pirated version with paid subscription

    This is perhaps a strange question, but here it goes. I have been helping a friend of mine with Photoshop CC which he bought a subscription for last friday. He already have a paid version of CS5, but got someone to help him with a pirated Photoshop C