When I display the page for the first time I get the links appearing like this:
expand
minimize
WHen I click on the expand it only displays:
expand
I then click on expand again and it displays:
expand
I don't understand whats happening????
Below is my code:
<script type="text/_javascript_">
function ShowDocs(){
if (all.style.display == 'none'){
all.style.display = 'block';
min.style.display = 'none';
expand.style.display = 'inline';
}
else{
all.style.display = 'none';
}
}
</script>
<div id="all" style="display:none">
<cfloop...
display list....
</cfloop>
</div>
<span id="expand">
<a href=""> </span>
<br>
<span id="min">
<a href=""> </span>
--Original Message Text---
From: Sandy Clark
Date: Wed, 23 Jun 2004 09:43:47 -0400
Keeping in mind that I rarely use _javascript_ for my CSS (since its not
accessible), that this might or might not be correct, but you should be able
to figure it out from there.
Do the opposite in your showExpand().
function ShowAll(){
if (all.style.display == 'none'){
all.style.display = 'block';
min.style.display = 'none';
expand.style.display = 'inline';
}
else{
all.style.display = 'none';
}
}
</script>
_____
From: Britney Spears [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 23, 2004 9:38 AM
To: CF-Community
Subject: RE: Using <div> tags
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]