[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Can you create a expand collapse boxes in php/Asp.net

Posted on 2009-02-23
2
Medium Priority
?
259 Views
Last Modified: 2012-06-27
hi everyone

i wanted to know if u can create an expand-collapse div in php/asp.net
i googled and found a code for javascript. even that will work

but my main problem is that i want totals of the columns as a summary and when i expand i want to see each individual transaction.

technologies used in the project are
ASP.NET,PHP,SQL SERVER 2005.

so please if any oneis able to help me in this.
0
Comment
Question by:jhawarmayank
2 Comments
 
LVL 6

Accepted Solution

by:
digital0iced0 earned 1000 total points
ID: 23715411
Well why don't you just output the JavaScript with the data from PHP or ASP.  Most of these scripts just use a div and a toggle function.

<?php
echo'
<p><a onclick="switchMenu('short');switchMenu('long');" title="Switch the Menu">Switch it now</a></p>

      <div id="short">
      <p>Total Sales: {$totalsales}, Average Sales: {$averagesales}</p>      
      </div>
       <div id="long">';
      //loop and output all the records
echo '</div>';
?>

Then on your page load you tell it to hide the detailed one.  So then every time you click the link it will alternate between the two divs.

<body onload="switchMenu('long');">

You can get the javascript here:
http://www.dustindiaz.com/dhtml-expand-and-collapse-div-menu/



0
 
LVL 5

Assisted Solution

by:JohnPatrickPhilip
JohnPatrickPhilip earned 1000 total points
ID: 23912312

you can use Ajax Control Tool Kit - Collapsible Panel- if you choose to go by this path with ASP.NET

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/CollapsiblePanel/CollapsiblePanel.aspx
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses
Course of the Month18 days, 23 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question