|
 |
asp_web_howto thread: <div> selection - I need your help with knowing what was selected.
Message #1 by "Charles Novak" <charles_novak@p...> on Tue, 20 Nov 2001 13:08:02
|
|
First - Thanks!
I am using a table within a <div> selection and need to know what <table>
was selected or showing for each row, when the save selection button is
chick.
Again, thank for all the great suggestion.
Please copy and paste
The following is the working sample code for the page:
<%@ Language=VBScript %>
<%
dim columnoption(20)
for i = 1 to 14
wdpc = 100 \ i
wdp = wdpc &"%"
tb = ""
tb = tb & "<table width='100%' height='40' border='1'
color='000000' align='center' cellpadding='0' cellspacing='0'>"
tb = tb & "<tr valign='center'>"
for j=1 to i
if j = 1 then
tb = tb & "<td onFocus='statusText(this.form, " &
i & ")' width='" & wdp & "'><b>" & i & "</b></td>"
else
tb = tb & "<td onFocus='statusText(this.form, " &
i & ")' width='" & wdp & "'> </td>"
end if
next
tb = tb & "</tr>"
tb = tb & "</table>"
columnoption(i) = tb
next
columncount = 14
zrow = 3
%>
<HTML>
<HEAD>
<TITLE></TITLE>
</head>
<BODY>
<FORM>
<table border="1" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td width="77%" height="200">
<table align="center" border="1" cellspacing="1"
bgcolor="#FFFFFF">
<%
for r = 1 to zrow %>
<tr>
<td><%=Response.Write(r)%></td>
<td>
<div
style="height:40;width:340;overflow:auto">
<%
for i = 1 to columncount
%>
<%=Response.Write
(columnoption(i)) %>
<%
next
%>
</div>
</td>
</tr>
<%
next %>
</table>
</td>
</tr>
<tr>
<td align="center">
<input style='width:170' type="button"
name="saveselection" value="Save Selections">
</td>
</tr>
</table>
</form>
</BODY>
</HTML>
Message #2 by "Jason Salas" <jason@k...> on Wed, 21 Nov 2001 07:23:09 +1000
|
|
How about just adding an "ID" attribute to each table? Not sure if this
will work...
----- Original Message -----
From: "Charles Novak" <charles_novak@p...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Tuesday, November 20, 2001 1:08 PM
Subject: [asp_web_howto] <div> selection - I need your help with knowing
what was selected.
> First - Thanks!
> I am using a table within a <div> selection and need to know what <table>
> was selected or showing for each row, when the save selection button is
> chick.
>
> Again, thank for all the great suggestion.
>
> Please copy and paste
> The following is the working sample code for the page:
>
> <%@ Language=VBScript %>
> <%
> dim columnoption(20)
> for i = 1 to 14
> wdpc = 100 \ i
> wdp = wdpc &"%"
> tb = ""
> tb = tb & "<table width='100%' height='40' border='1'
> color='000000' align='center' cellpadding='0' cellspacing='0'>"
> tb = tb & "<tr valign='center'>"
> for j=1 to i
> if j = 1 then
> tb = tb & "<td onFocus='statusText(this.form, " &
> i & ")' width='" & wdp & "'><b>" & i & "</b></td>"
> else
> tb = tb & "<td onFocus='statusText(this.form, " &
> i & ")' width='" & wdp & "'> </td>"
> end if
> next
> tb = tb & "</tr>"
> tb = tb & "</table>"
> columnoption(i) = tb
> next
> columncount = 14
> zrow = 3
> %>
> <HTML>
> <HEAD>
> <TITLE></TITLE>
> </head>
> <BODY>
> <FORM>
> <table border="1" cellspacing="1" bgcolor="#FFFFFF">
> <tr>
> <td width="77%" height="200">
> <table align="center" border="1" cellspacing="1"
> bgcolor="#FFFFFF">
> <%
> for r = 1 to zrow %>
> <tr>
> <td><%=Response.Write(r)%></td>
> <td>
> <div
> style="height:40;width:340;overflow:auto">
> <%
> for i = 1 to columncount
> %>
> <%=Response.Write
> (columnoption(i)) %>
> <%
> next
> %>
> </div>
> </td>
> </tr>
> <%
> next %>
> </table>
> </td>
> </tr>
> <tr>
> <td align="center">
> <input style='width:170' type="button"
> name="saveselection" value="Save Selections">
> </td>
> </tr>
> </table>
> </form>
> </BODY>
> </HTML>
>
>
$subst('Email.Unsub')
>
>
|
|
 |