dan18088
10-19-2003, 02:09 AM
Any idea's on how I can get the data between the # signs into a variable so it can be posted to another page and written to a SQL database?
<Script>
var rowsAlreadyDone = new Array(100); // arbitrary size
var ELpntr=1;
function NewRow(rownum)
{
if ( rowsAlreadyDone[rownum] == "DONE" ) return; // just ignore the request
rowsAlreadyDone[rownum] = "DONE";
ELpntr++;
var content1='';
content1='<select name="SalesStaff'+ELpntr+'" onChange="NewRow('+ELpntr+')">';
<% set conntemp=server.createobject("adodb.connection")
conntemp.open
SQL="Select emppers.*,empcomp.* from (Emppers Inner Join Empcomp ON(empcomp.EecEmplStatus <>'T' AND EecOrglvl1 like '%SAL%' AND emppers.eepeeid=empcomp.eeceeid)) order by eepnamelast"
set rstemp=conntemp.execute(SQL)
Response.write "content1+='<option value=""""></option>';" & vbcrlf
'This loop creates all the options
do until rstemp.eof
sFullName = Trim(rstemp("eepnamelast")) & "_" & Trim(rstemp("eepnamefirst"))
sFullName = Replace(sFullName,"'", " ")
sFirstName = Trim(rstemp("eepnamefirst"))
sFirstName = Replace(sFirstName,"'", " ")
sLastName = Trim(rstemp("eepnamelast"))
sLastName = Replace(sLastName,"'", " ")
sEmployeeID = Trim(rstemp("eepeeid"))
sID = Trim(rstemp("EecEmpNo"))
sDepartment = Trim(rstemp("EecOrglvl1"))
sRegion = Trim(rstemp("EecOrglvl2"))
sStatus = Trim(rstemp("EecFullTimeOrPartTime"))
Response.Write "content1+='<option Value="""& "#" & sEmployeeID & "#" & sFirstName & "#" & sLastName & "#" & sID & "#" & sDepartment & "#" & sRegion & "#" & sStatus & """>" & sFullName & "</option>';" & vbcrlf
rstemp.movenext
Loop
rstemp.close
conntemp.close
'This closes the select list
Response.write "content1+='</select></td>';"
%>
<Script>
var rowsAlreadyDone = new Array(100); // arbitrary size
var ELpntr=1;
function NewRow(rownum)
{
if ( rowsAlreadyDone[rownum] == "DONE" ) return; // just ignore the request
rowsAlreadyDone[rownum] = "DONE";
ELpntr++;
var content1='';
content1='<select name="SalesStaff'+ELpntr+'" onChange="NewRow('+ELpntr+')">';
<% set conntemp=server.createobject("adodb.connection")
conntemp.open
SQL="Select emppers.*,empcomp.* from (Emppers Inner Join Empcomp ON(empcomp.EecEmplStatus <>'T' AND EecOrglvl1 like '%SAL%' AND emppers.eepeeid=empcomp.eeceeid)) order by eepnamelast"
set rstemp=conntemp.execute(SQL)
Response.write "content1+='<option value=""""></option>';" & vbcrlf
'This loop creates all the options
do until rstemp.eof
sFullName = Trim(rstemp("eepnamelast")) & "_" & Trim(rstemp("eepnamefirst"))
sFullName = Replace(sFullName,"'", " ")
sFirstName = Trim(rstemp("eepnamefirst"))
sFirstName = Replace(sFirstName,"'", " ")
sLastName = Trim(rstemp("eepnamelast"))
sLastName = Replace(sLastName,"'", " ")
sEmployeeID = Trim(rstemp("eepeeid"))
sID = Trim(rstemp("EecEmpNo"))
sDepartment = Trim(rstemp("EecOrglvl1"))
sRegion = Trim(rstemp("EecOrglvl2"))
sStatus = Trim(rstemp("EecFullTimeOrPartTime"))
Response.Write "content1+='<option Value="""& "#" & sEmployeeID & "#" & sFirstName & "#" & sLastName & "#" & sID & "#" & sDepartment & "#" & sRegion & "#" & sStatus & """>" & sFullName & "</option>';" & vbcrlf
rstemp.movenext
Loop
rstemp.close
conntemp.close
'This closes the select list
Response.write "content1+='</select></td>';"
%>