Hi, I am really having problems with this and I don't know why it's so hard. I have a page with a dynamic menu. When the user clicks on the menu I want to get all the information from the database on the field they selected and put this information into text boxes.
in the <% %> brackets it doesn't seem to recognize the value of my select box (frmArticles.select.value) however if I put it in <Script Language="VBSCRIPT> </SCRIPT> it does recognize this value. Is there some different code to get the value from a list menu when using the in the <% %> brackets? The problem is that if I use the other synatax the server connection doesn't work.
My code looks like this. Everything works except that it doesn't recognize the value of frmArticles.select.value :
<%@LANGUAGE="VBSCRIPT"%>
....
<SCRIPT LANGUAGE="JavaScript">
function Fillboxes()
{
<%
set GetArticle = Server.CreateObject("ADODB.Recordset"
GetArticle.ActiveConnection = MM_enerchihealth_STRING
GetArticle.Source = "SELECT * FROM dbo.tblArticle where fldArticleNum = " & frmArticles.select.value
GetArticle.CursorType = 0
GetArticle.CursorLocation = 2
GetArticle.LockType = 3
GetArticle.Open()
GetArticle_numRows = 0
response.write "ArticleID: " & articleid
%>
document.frmInsert.fldTitle2.value = "<%=(GetArticle.Fields.Item("fldTitle".Value)%>";
}
</SCRIPT>
Thanks so much for your help.
in the <% %> brackets it doesn't seem to recognize the value of my select box (frmArticles.select.value) however if I put it in <Script Language="VBSCRIPT> </SCRIPT> it does recognize this value. Is there some different code to get the value from a list menu when using the in the <% %> brackets? The problem is that if I use the other synatax the server connection doesn't work.
My code looks like this. Everything works except that it doesn't recognize the value of frmArticles.select.value :
<%@LANGUAGE="VBSCRIPT"%>
....
<SCRIPT LANGUAGE="JavaScript">
function Fillboxes()
{
<%
set GetArticle = Server.CreateObject("ADODB.Recordset"
GetArticle.ActiveConnection = MM_enerchihealth_STRING
GetArticle.Source = "SELECT * FROM dbo.tblArticle where fldArticleNum = " & frmArticles.select.value
GetArticle.CursorType = 0
GetArticle.CursorLocation = 2
GetArticle.LockType = 3
GetArticle.Open()
GetArticle_numRows = 0
response.write "ArticleID: " & articleid
%>
document.frmInsert.fldTitle2.value = "<%=(GetArticle.Fields.Item("fldTitle".Value)%>";
}
</SCRIPT>
Thanks so much for your help.