|
 |
asp_databases thread: Auto-populating fields
Message #1 by "Steven Shultz" <steven.shultz@s...> on Wed, 20 Jun 2001 17:18:57
|
|
I have installed a web-based call tracking system that uses proprietary
pages called simple server pages (SSP). They are very similar to ASPs and
I am learning how to convert between the 2. I am still very new to ASPs.
Here is my problem:
When creating a new ticket, I want to be able to select the customers name
from a drop-down box, submit that, and have it auto-populate the rest of
their info (phone, contact, address, etc.), instead of typing it in every
time. It uses an Access database and I know how to pull information from
that into the page but I can't figure out how to populate some fields
depending on the contents of another field. Any suggestions? As I stated
earlier, I am learning how to use ASP concepts in the SSPs so any thoughts
will be appreciated.
Thanks.
Steve
Message #2 by ashish jindal <ashujin@u...> on 22 Jun 2001 00:41:04 MDT
|
|
hi steve
even i am new to asp but not very new.
the prob that u r facing has the solution here
<script language=3DJavaScript>
<!--
function submClients()
{
var checkIndex;
checkIndex=3Ddocument.submDebit.selDebit.selectedIndex;
if(checkIndex=3D=3D"2")
{
window.document.location.href=3D"continue.asp?Mode=3D00100"
document.submDebit.selDebit.selectedIndex=3D2
}
else
{
if((checkIndex=3D=3D"1") || (checkIndex=3D=3D"0"))
{
' write the code
}
}
'to make the fiels that u want to populate from database
<select name=3DselClient>
<%
if Request.QueryString("Mode")=3D"00100" then
dim myConnClnt,myRsClnt,mySQLClnt
set myConnClnt=3DServer.CreateObject("ADODB.Connection")
set myRsClnt=3DServer.CreateObject("ADODB.Recordset")
mySQLClnt=3D"select * from tblClients"
myConnClnt.Open "PROVIDER=3DMicrosoft.Jet.OLEDB.4.0;Data
Source=3Dc:\windows/desktop/travel/traveldb.mdb;"
myRsClnt.Open mySQLClnt,myConnClnt
do while not myRsClnt.EOF
dim getClnt
getClnt=3DmyRsClnt.Fields("clientName")
%>
<option value=3D"<%=3DgetClnt%>"><%=3DgetClnt%></option>
<%
myRsClnt.MoveNext
Loop
end if
%>
</select>
|
|
 |