TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
selvi subramanian
NA
799
574.5k
multiply value od dropdown and textbox value
Aug 18 2013 2:35 AM
how to mulltiply dropdown value and textbox value.. my design
<form id="form1" runat="server">
<%-- <script type="text/javascript">
function GetTotal() {
var val1 = document.getElementById("DropDownList3").value;
var val2 = document.getElementById("TextBox1").value;
if (val1 != "" && val2 != "") {
var total=document.getElementById("txttp").value;
total=parseInt(val1)*parseInt(val2);
alert(total);
}
}
</script>--%>
<script type="text/javascript">
function GetTotal() {
var val1 = document.getElementById("<%# DropDownList3.ClientID %>").value;
var val2 = document.getElementById("<%# TextBox1.ClientID %>").value;
if (val1 != "" && val2 != "") {
var total=parseInt(val1)*parseInt(val2);
document.getElementById("<%# Label14.ClientID %>").innerHtml=total;
}
}
</script>
<script type="text/javascript" language="javascript">
function attendance()
{
if(document.getElementById('ctl00_ContentReport_ddlemployeeid').value == "0")
{
alert("Choose EmployeeId");
document.getElementById('ctl00_ContentReport_ddlemployeeid').focus();
return false;
}
if(document.getElementById('ctl00_ContentReport_txtfrom').value == "")
{
alert("Enter From Date");
document.getElementById('ctl00_ContentReport_txtfrom').focus();
return false;
}
if(document.getElementById('ctl00_ContentReport_txtto').value == "")
{
alert("Enter To Date");
document.getElementById('ctl00_ContentReport_txtto').focus();
return false;
}
return true;
}
</script>
<p>
<br />
<table class="style2" align="center" style="border-color: #1d599e; border-style: outset;
border-width: thin; background-color: #D7D7D7; width:50%" >
<tr>
<td style="margin-left: 80px; background:#1d599e;" align="center" colspan="2">
BILLING DETAILS
</td>
</tr>
<tr>
<td colspan="2">
</td>
</tr>
<tr align="left">
<td>
<asp:Label ID="Label1" runat="server" Text="Product" Visible="false"></asp:Label>
</td>
<td>
<asp:TextBox ID="TextBox2" runat="server" Visible="false" Text="Cement"></asp:TextBox>
</td>
</tr>
<tr align="left">
<td>
<asp:Label ID="Label2" runat="server" Text="Date"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtdate" runat="server"></asp:TextBox>
</td>
</tr>
<tr align="left">
<td>
<asp:Label ID="Label3" runat="server" Text="BillNo"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtbillno" runat="server"
></asp:TextBox>
</td>
</tr>
<tr align="left">
<td>
<asp:Label ID="Label4" runat="server" Text="Customer Name"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtcn" runat="server" ></asp:TextBox>
</td>
</tr>
<tr align="left">
<td>
<asp:Label ID="Label5" runat="server" Text="Address"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtad" runat="server"></asp:TextBox>
</td>
</tr>
<tr align="left">
<td>
<asp:Label ID="Label6" runat="server" Text="Brand Name"></asp:Label> </td>
<td>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
onselectedindexchanged="DropDownList1_SelectedIndexChanged" Width="146px">
</asp:DropDownList>
</td>
</tr>
<tr align="left">
<td>
<asp:Label ID="Label7" runat="server" Text="Quantity"></asp:Label> </td>
<td>
<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True"
onselectedindexchanged="DropDownList2_SelectedIndexChanged" Height="16px"
Width="146px">
<asp:ListItem>Select</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr align="left">
<td>
<asp:Label ID="Label8" runat="server" Text="Price"></asp:Label>
</td>
<td>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label11" runat="server" Text="Required No"></asp:Label>
</td>
<td>
<asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="true"
onselectedindexchanged="DropDownList3_SelectedIndexChanged" Width="149px" onhange="return GetTotal()" >
</asp:DropDownList>
<asp:Label ID="Label14" runat="server" Visible="False"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label12" runat="server" Text="TotalPrice"></asp:Label>
</td>
<td>
<asp:TextBox ID="txttp" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label13" runat="server" Text="Vat"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtvat" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
vat/</td>
<td>
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
</td>
</tr>
<tr align="left">
<td>
<asp:Label ID="Label9" runat="server" Text="Extra"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtex" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Button ID="Button1" runat="server" Text="Submit" onclick="Button1_Click" />
<asp:Label ID="Label10" runat="server" Text=""></asp:Label>
<asp:Button ID="Button2" runat="server" Text="clear" onclick="Button2_Click" />
</td>
</tr>
</table>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
</form>
in this i need to display the Price * Requiedno =totaprice (textbox)
Reply
Answers (
0
)
Dll cant Compile.
dynamic menu with left side sliding popup menu panel