?
Solved

collapsing a drilled down span.....

Posted on 2006-06-28
6
Medium Priority
?
255 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

765 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