HI friends,
I got a problem here , anyone could help me?
I'm creating a web form,user can choose different table in this form, then the form will show all the fields in this table. SO I add a event: OnTableSelectChange(). In this function, I try to get table's name,then use ADO get field name from database,the code is :
{
strTableName = document.frmEditSql.elements["selTableName"];
<%
Dim rs
Set cnnADO = dbGetConnection()
strSQL= "select * from " & strTableName
strSQL = strSQL &" where ROWNUM<1"
Set rs = cnnADO.Execute(strSQL)
count = rs.Fields.Count
dim index
For index=0 to count-1
%>objFields.options[<%= index %>] = new Option("<%= rs.fields(index).name%>","<%= rs.fields(index).name%>"
<%
Next
%>
}
But in asp code, it can't get strTableName from JavaScript. How can I make it work?
Thanks!
vicky
I got a problem here , anyone could help me?
I'm creating a web form,user can choose different table in this form, then the form will show all the fields in this table. SO I add a event: OnTableSelectChange(). In this function, I try to get table's name,then use ADO get field name from database,the code is :
{
strTableName = document.frmEditSql.elements["selTableName"];
<%
Dim rs
Set cnnADO = dbGetConnection()
strSQL= "select * from " & strTableName
strSQL = strSQL &" where ROWNUM<1"
Set rs = cnnADO.Execute(strSQL)
count = rs.Fields.Count
dim index
For index=0 to count-1
%>objFields.options[<%= index %>] = new Option("<%= rs.fields(index).name%>","<%= rs.fields(index).name%>"
<%
Next
%>
}
But in asp code, it can't get strTableName from JavaScript. How can I make it work?
Thanks!
vicky