How can I enter value based on Selected item

T

techy techno

hii

i created a form like this
<html>
<head>
<title>ACCOUNT EXAMPLE</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">

<p>&nbsp;</p>
<p>&nbsp;</p>
<form name="form1" method="post" action="">
<table width="821" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="239">
<div align="center"><font size="2"><b>DATE :</b></font>
<input type="text" name="txtDate">
</div>
</td>
<td width="312"> <font size="2"><b>DETAILS :</b></font>
<textarea name="txtDetails" rows="2" cols="30">SALARY PAID
</textarea>
</td>
<td width="85">
<div align="center">
<select name="select">
<option>DEBIT</option>
<option>CREDIT</option>
</select>
</div>
</td>
<td width="102">
<div align="left">
<input type="text" name="txtAmount" value="RS 5000">
</div>
</td>
<td width="11">
<input type="submit" name="Submit" value="INSERT">
</td>
</tr>
</table>
</form>
<p>&nbsp;</p>
</body>
</html>


when the user selects debit I want the amount to go into the debit field
of the accounts table and when he users selects credit it should go into
the credit field(colum) of the accounts table

how can I do this in ULTRADEV or UD
 
R

Ray at

What table are you talking about? In a database? If so, you'll use a
if-then, or a select-case, like so:


Dim sType
sType = Request.Form("YouNeedToNameYourSELECTandPutTheNameHere")
'You also need to give values to the options

Select Case sType
Case "CREDIT"
sSQL = "your appropriate sql string"
Case "DEBIT"
sSQL = "your appropriate sql string"
End Select

Ray at home
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top