Does anyone know how to retrieve information from database by selecting options from select box? This code works if I put value="John" which is of a string type. But when I put value="<%=rsUserInfo("usr_firstName"
%>" it gives me type mismatch error. It seems that the JavaScript function recieve only string type but not Recordset object.
I actually need to fit this code to the application which will email the content of the textarea to users. Each user should get his unique information like: name, address, email, username, etc...
Does anyone know how to write function to do this?
Thanks.
function selectItem()
{
document.the_form.the_area.value += " " + <%_%>
the_form.the_selectbox.options[the_form.the_selectbox.selectedIndex].value;
}
...
<form name="the_form" method="post" >
<select name="the_selectbox" onChange="selectItem();">
<option value="<%=rsUserInfo("usr_firstName"
%>">First Name
<option value="<%=rsUserInfo("usr_lastName"
%>">Last Name
<option value="<%=rsUserInfo("usr_address"
%>">Address
</select>
<textarea rows="15" cols="60" name="the_area"></textarea>
</form>
...
I actually need to fit this code to the application which will email the content of the textarea to users. Each user should get his unique information like: name, address, email, username, etc...
Does anyone know how to write function to do this?
Thanks.
function selectItem()
{
document.the_form.the_area.value += " " + <%_%>
the_form.the_selectbox.options[the_form.the_selectbox.selectedIndex].value;
}
...
<form name="the_form" method="post" >
<select name="the_selectbox" onChange="selectItem();">
<option value="<%=rsUserInfo("usr_firstName"
<option value="<%=rsUserInfo("usr_lastName"
<option value="<%=rsUserInfo("usr_address"
</select>
<textarea rows="15" cols="60" name="the_area"></textarea>
</form>
...