Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

collapsing a drilled down span.....

Posted on 2006-06-28
6
Medium Priority
?
257 Views
Last Modified: 2006-11-18
i have a button that causes a row to be inserted into the table directly below the row of the button....using............:

<tr>                              
                  <td><input type=button name="btnClose" Value="View Agent" onClick="displayAgent('<%=nameString%>')" ID="Button2"></td>
                  <td><input type=button Value="+" onClick="displayDrill('<%=rst("Bcode")%>')" ID="Button1"></td>
                  <td><%=rst("Bcode")%></td>
                  <td><%=nameString%></td>
                  <td><%=formatdate(rst("departuredate"))%></td>
                  <td><%=formatdate(rst("bdate"))%></td>
                  <td><%= FormatNumber(rst("tot"),2)%></td>
            </tr>
            <TR><td colspan=10>
            <Span id=spn<%=rst("Bcode")%>>
            
             </Span>
            </td></TR>


with the function:
function displayDrill(Bcode)
      document.all("spn" & Bcode).innerhtml =  "<TD>HELLOOOO</TD>"
end function


can someone tell me how id go about collapsing the row again if the user clicked the button again.

cheers
0
Comment
Question by:scm0sml
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 
LVL 11

Expert Comment

by:SweatCoder
ID: 17001031
Are you using javascript to do this? If so, not sure why you're posting this in ASP section. Did you put your function inside javascript tags?
0
 

Author Comment

by:scm0sml
ID: 17001042
vbscript
0
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 2000 total points
ID: 17001157
If you just wanted to clear it out you could use something like:

    Function displayDrill( Bcode )

        curText = document.all("spn" & Bcode).InnerHtml
        If curText <> "" Then
            document.all("spn" & Bcode).InnerHtml = ""
        Else
            document.all("spn" & Bcode).InnerHtml = "<td>HELLOOOO</td>"
        End If

    End Function
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:scm0sml
ID: 17001217
function displayDrill(Bcode)
      curText = document.all("spn" & Bcode).InnerHtml
      If curText <> "" Then
            document.all("spn" &amp; Bcode).InnerHtml = ""
      Else
            document.all("spn" &amp; Bcode).InnerHtml = <td>HELLOOOO</td>"
      End If            
      'document.all("spn" & Bcode).innerhtml =  "<table><tr><TD>HELLOOOO</TD>"
end function

thats what I've got now but its stopped working completely?
0
 

Author Comment

by:scm0sml
ID: 17001284
i've just seen and changed &amp;
0
 

Author Comment

by:scm0sml
ID: 17001316
yeah that worked actually....just a bit of syntax hadnt copied well etc............

cheers
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

610 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