Hi, Thanks for looking at my question.
I have a simple ASP generated loop through a table that shows some Helpdesk Ticket ID's.
For some of the Ticket ID's they have related tickets (sub tickets).
I am trying to create a expand button against each ticket ID that contains sub tickets so the user can click the expand image and the sub tickets will display. Then if they click the image again they will not display.
I am unsure of how to pass a ASP varible to then using it in the JS function.
(excuse the crude code)
--------------------------
----------
-Here is the code----------------------
----------
----------
----------
Do while NOT RS.EOF
varTicket_ID = RS("Ticket_ID")
%>
<img src="PlusSign.gif" ONCLICK="RUN_MY_JS_Functio
n(<%=varTi
cket_ID%>)
">
<table ID="TABLE_ID_<%=varTicket_
ID%>" style="Display:none">
<tr>
<td>This info is for Ticket ID: <%=varTicket_ID%>" andshould only display when the icon is clicked for this ticket</td>
</tr>
</table>
<%
RS.Movenext
loop
%>
--------------------------
---------H
ere is the Javascript --------------------------
----------
----------
----------
Function Run_MY_JS_FUNCTION() {
varTickID = The ticket ID from the function
if (the user has clicked the plus image then){
document.getElementById('T
ABLE_ID_+"
varTickID"
+').style.
display='b
lock';
}
else
{
document.getElementById('T
ABLE_ID_+"
varTickID"
+').style.
display='n
one';
}
}
Please see the images I have attached for a example
I dont think I am a million miles off but I hope you can help!
Many thanks
Stu
Start Free Trial