scm0sml
asked on
collapsing a drilled down span.....
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("dep arturedate "))%></td>
<td><%=formatdate(rst("bda te"))%></t d>
<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
<tr>
<td><input type=button name="btnClose" Value="View Agent" onClick="displayAgent('<%=
<td><input type=button Value="+" onClick="displayDrill('<%=
<td><%=rst("Bcode")%></td>
<td><%=nameString%></td>
<td><%=formatdate(rst("dep
<td><%=formatdate(rst("bda
<td><%= FormatNumber(rst("tot"),2)
</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
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?
ASKER
vbscript
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
'document.all("spn" & Bcode).innerhtml = "<table><tr><TD>HELLOOOO</ TD>"
end function
thats what I've got now but its stopped working completely?
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
'document.all("spn" & Bcode).innerhtml = "<table><tr><TD>HELLOOOO</
end function
thats what I've got now but its stopped working completely?
ASKER
i've just seen and changed &
ASKER
yeah that worked actually....just a bit of syntax hadnt copied well etc............
cheers
cheers