Hi Vipul, I have a billing page it has a column called ISRNumber,I will display all the ISRNumber in that dropdownlist,When i select a particular id from the dropdown list,the corresponding ISRName,ISRDescription,ISRStatus and Date_when_NOC_Sent should be populated in the corressponding textbox.Can u tell me the java script to do this. I am new in asp and javascript. Can u tell me the code to do this.
The code is here
<html> <head> <title>ISR-Billing</title> <script language="JavaScript" src="ISR_Billing-Validation.js"></script> <!-- American format mm/dd/yyyy --> <script language="JavaScript" src="calendar2.js"></script><!-- Date only with year scrolling --> </head> <% Dim conn,ors,strSQLConn,strSql set conn = server.createobject("ADODB.Connection") set ors = server.createobject("ADODB.Recordset") strSQLConn = "Provider=SQLOLEDB; Data Source=ipaddress; Initial Catalog=cmb; User Id=name; Password=pwd" conn.Open strSQLConn strSql="Select ISRNumber from ISR" ors.Open strSql,conn %>
<form name="Billing" method="post" action="BillingCheck-ISR.asp">
<h2 align="center"> Enter the Billing Details </h2> <table border=1 style="WIDTH: 1068px; HEIGHT: 171px"> <tr bgcolor=#738ead><td><font color=white size=2><B>ISRNumber : <select name="ISRNumber" id="ISRNumber"> <option selected>----Select----</option> <%while not ors.eof %> <option value="<%=ors.fields("ISRNumber")%>"><%=ors.fields("ISRNumber")%></option> <% ors.movenext wend %></B></font></td> <% ors.Close conn.Close %>
<td bgcolor=#738ead><font color=white size=2><b>ISRName:<input name="ISRName" value=<%Response.Write("Select ISRName From ISR Where ISRNumber=' " & Request.Form("ISRNumber") & " ' ")%> style="WIDTH: 163px; HEIGHT: 22px" ></b></font></td> <td bgcolor=#738ead><font color=white size=2><b>ISRDescription:<input name="ISRDescription" value=<%="ISRDescription"%> style="WIDTH: 151px; HEIGHT: 22px" size=19></b></font></td> <td bgcolor=#738ead><font color=white size=2><b>ISRStatus:<input name="ISRStatus" value=<%="ISRStatus"%> style="WIDTH: 167px; HEIGHT: 22px" size=21> </b></font></td></tr> <tr bgcolor=#738ead><td><font color=white size=2><b>Date_When_NOC_Sent:<input name="Date_When_NOC_Sent" value=<%="Date_When_NOC_Sent"%> style="WIDTH: 135px; HEIGHT: 22px" size=15></b></font></td> <td bgcolor=#738ead><font color=white size=2><b>Total_Billing_Amount:<input name="Total_Billing_Amount" style="WIDTH: 94px; HEIGHT: 22px" size=12> </b></font></td> <td bgcolor=#738ead><font color=white size=2><b>100% Billing Amount:<input name="HundredPercent_Billing_Amount" style="WIDTH: 107px; HEIGHT: 22px" size=9></b></font></td> <td bgcolor=#738ead><font color=white size=2><b>100% Billing Date:<input name="HundredPercent_Billing_Date" title="Enter 100% Billing Date in MM/DD/YYYY FORMAT" style="WIDTH: 85px; HEIGHT: 22px" size=9></b></font><A href="javascript:cal2.popup();"><IMG style="WIDTH: 33px; HEIGHT: 16px" height=16 src="D:\HoneyWell\p1\p1_Local\images\cal.gif"></A></td></tr> <tr bgcolor=#738ead><td><font color=white size=2><b>80% Billing Amount:<input name="EightyPercent_Billing_Amount" style="WIDTH: 107px; HEIGHT: 22px" size=12></b></font></td> <td bgcolor=#738ead><font color=white size=2><b>80% Billing Date:<input name="EightyPercent_Billing_Date" title="Enter 80% Billing Date in MM/DD/YYYY FORMAT" style="WIDTH: 88px; HEIGHT: 22px" size=9></b></font><A href="javascript:cal3.popup();"><IMG style="WIDTH: 33px; HEIGHT: 16px" height=16 src="D:\HoneyWell\p1\p1_Local\images\cal.gif"></A></td> <td bgcolor=#738ead><font color=white size=2><b>20% Billing Amount:$<input name="TwentyPercent_Billing_Amount" style="WIDTH: 107px; HEIGHT: 22px" size=12></b></font></td> <td bgcolor=#738ead><font color=white size=2><b>20% Billing Date:<input name="TwentyPercent_Billing_Date" title="Enter 20% Billing Date in MM/DD/YYYY FORMAT" style="WIDTH: 92px; HEIGHT: 22px" size=7></b></font><A href="javascript:cal4.popup();"><IMG style="WIDTH: 33px; HEIGHT: 16px" height=16 src="D:\HoneyWell\p1\p1_Local\images\cal.gif"></A></td> </tr> <tr bgcolor=#738ead><td><font color=white size=2><b>Type:<input name="Type" style="WIDTH: 202px; HEIGHT: 22px" size=22></b></font></td> <td bgcolor=#738ead><font color=white size=2><b>Server:<input name="Server" style="WIDTH: 185px; HEIGHT: 22px" ></b></font></td> <td bgcolor=#738ead><font color=white size=2><b>Amount:<input name="Amount" style="WIDTH: 190px; HEIGHT: 22px" size=24></b></font></td></tr> <tr><td><input type="submit" value="SAVE" id=submit1 name=submit1 onclick= "return validatetextbox();"></td> </tr> </table> </form> <script language="javascript"> var cal2 = new calendar2(document.forms['Billing'].elements['HundredPercent_Billing_Date']); cal2.year_scroll = true; cal2.time_comp = false; var cal3 = new calendar2(document.forms['Billing'].elements['EightyPercent_Billing_Date']); cal3.year_scroll = true; cal3.time_comp = false; var cal4 = new calendar2(document.forms['Billing'].elements['TwentyPercent_Billing_Date']); cal4.year_scroll = true; cal4.time_comp = false; </script> </body> </html>
|
No responses found. Be the first to respond and make money from revenue sharing program.
|