How would I incorporate that into my code <script> below?

--Original Message Text---
From: Sandy Clark
Date: Wed, 23 Jun 2004 09:17:27 -0400

Create two <spans>
<span id="min">Minimize</span>
<span id="expand">Expand></span>
Then in your _javascript_ to display the expand and not the minimize, set
min.display='none'
expand.display='inline'

reverse for displaying the minimize.

  _____  

From: Britney Spears [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 23, 2004 9:03 AM
To: CF-Community
Subject: re: Using <div> tags

Hello,

I'm using a <div> tag to display entries from my database. I display the
first five selections. If more than 5 was selected then you click on the
"expand" link and it displays the rest of the
selections.

How can I change the text so when the "expand" link is clicked it displays
the remaining selections and changes the "expand" to "minimize"?

NOTE: All the text within the DIV is appearing correctly. The problem I have
is getting the "expand" and "minimize" to appear when clicked.

<script type="text/_javascript_">
function ShowAll(){
if (all.style.display == 'none'){
   all.style.display = 'block';
}
else{
   all.style.display = 'none';
}
}
</script>

<div id="All" style="display:none">
<cfloop...
    code here...
</cfloop>
</div>

<cfif counter gt 5>
<a href=""> </cfif>

Display:

1. selection 1
2. selection 1
3. selection 1
4. selection 1
5. selection 1

expand
---------

Once the "expand" link is clicked I want the "minimize" to appear.

Display:

1. selection 1
2. selection 1
3. selection 1
4. selection 1
5. selection 1
6. selection 1
7. selection 1
8. selection 1

minmize
---------

And once the "minimize" is clicked...

Once the "expand" link is clicked I want the "minimize" to appear.

Display:

1. selection 1
2. selection 1
3. selection 1
4. selection 1
5. selection 1

expand
---------
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to