1.i have this code now all i want is to populate the first listbox with dates.Now i have source code which is date i
can convert this as done below[10/07/02 11 dd/mm/yy hh] but am having problems with LOOP to increment the hour 168 times[7*24=168]
So each our is populated in the first listbox
2. I have javascript to move items from listbox 1 to 2 now all i need to do is get all the items selected in LIST 2 and insert into SQl server Employee table just ID
How do i get all the items in LISTBOX2
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript" SRC="selectbox.js"></SCRIPT>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>
</head>
<body>
<FORM>
<TABLE BORDER=0>
<TR>
<TD>
<SELECT NAME="list11" MULTIPLE SIZE=10 onDblClick="moveSelectedOptions(this.form.list11,this.form.list21,false)">
<%
Dim a
DIM l
Dim Pal_Date
dim x
Dim Dateads
Dim DateADD
Dim COunt
DIM Y
a = 02071011 ' this is a source code all it is dd/mm/yy/hh
Pal_Date = mid(a, 5, 2) & "/" & mid(a, 3, 2) & "/" & mid(a, 1, 2) & " " & mid(a, 7, 2)& ":" & "00"
'x = formatdatetime(Pal_Date)
for l = 0 to 168
DateADs = dateadd("h",1,Y) ' This SHOULD increments hour
%>
<OPTION><%=Dateads%></OPTION>
<%
next
%>
</SELECT>
</TD>
<TD VALIGN=MIDDLE ALIGN=CENTER>
<INPUT TYPE="button" NAME="right" VALUE=">>" ONCLICK="moveSelectedOptions(this.form.list11,this.form.list21,false)"><BR><BR>
<INPUT TYPE="button" NAME="right" VALUE="All >>" ONCLICK="moveAllOptions(this.form.list11,this.form.list21,false)"><BR><BR>
<INPUT TYPE="button" NAME="left" VALUE="<<" ONCLICK="moveSelectedOptions(this.form.list21,this.form.list11,false)"><BR><BR>
<INPUT TYPE="button" NAME="left" VALUE="All <<" ONCLICK="moveAllOptions(this.form.list21,this.form.list11,false)">
</TD>
<TD>
<SELECT NAME="list21" MULTIPLE SIZE=10 onDblClick="moveSelectedOptions(this.form.list21,this.form.list11,false)">
</SELECT>
</TD>
</TR>
</TABLE>
</FORM>
<P></P>
<P></P>
<P></P>
<P></P>
<INPUT type="button" value="Button" onclick=window.close() id=button1 name=button1>
</BODY>
</HTML>
Thanks you for any advise
Sammy
can convert this as done below[10/07/02 11 dd/mm/yy hh] but am having problems with LOOP to increment the hour 168 times[7*24=168]
So each our is populated in the first listbox
2. I have javascript to move items from listbox 1 to 2 now all i need to do is get all the items selected in LIST 2 and insert into SQl server Employee table just ID
How do i get all the items in LISTBOX2
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript" SRC="selectbox.js"></SCRIPT>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>
</head>
<body>
<FORM>
<TABLE BORDER=0>
<TR>
<TD>
<SELECT NAME="list11" MULTIPLE SIZE=10 onDblClick="moveSelectedOptions(this.form.list11,this.form.list21,false)">
<%
Dim a
DIM l
Dim Pal_Date
dim x
Dim Dateads
Dim DateADD
Dim COunt
DIM Y
a = 02071011 ' this is a source code all it is dd/mm/yy/hh
Pal_Date = mid(a, 5, 2) & "/" & mid(a, 3, 2) & "/" & mid(a, 1, 2) & " " & mid(a, 7, 2)& ":" & "00"
'x = formatdatetime(Pal_Date)
for l = 0 to 168
DateADs = dateadd("h",1,Y) ' This SHOULD increments hour
%>
<OPTION><%=Dateads%></OPTION>
<%
next
%>
</SELECT>
</TD>
<TD VALIGN=MIDDLE ALIGN=CENTER>
<INPUT TYPE="button" NAME="right" VALUE=">>" ONCLICK="moveSelectedOptions(this.form.list11,this.form.list21,false)"><BR><BR>
<INPUT TYPE="button" NAME="right" VALUE="All >>" ONCLICK="moveAllOptions(this.form.list11,this.form.list21,false)"><BR><BR>
<INPUT TYPE="button" NAME="left" VALUE="<<" ONCLICK="moveSelectedOptions(this.form.list21,this.form.list11,false)"><BR><BR>
<INPUT TYPE="button" NAME="left" VALUE="All <<" ONCLICK="moveAllOptions(this.form.list21,this.form.list11,false)">
</TD>
<TD>
<SELECT NAME="list21" MULTIPLE SIZE=10 onDblClick="moveSelectedOptions(this.form.list21,this.form.list11,false)">
</SELECT>
</TD>
</TR>
</TABLE>
</FORM>
<P></P>
<P></P>
<P></P>
<P></P>
<INPUT type="button" value="Button" onclick=window.close() id=button1 name=button1>
</BODY>
</HTML>
Thanks you for any advise
Sammy