Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage2.master" AutoEventWireup="true" CodeFile="OtherSourceIncome_1.aspx.cs" Inherits="OtherSourceIncome" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <br />
Posted
Updated 22-May-12 23:59pm
v3
Comments
E.F. Nijboer 23-May-12 4:26am    
Can you understand this yourself? Please use code blocks around code and be more specific about the problem you have. Just posting code won't get you an answer.
Deepak_Sharma_ 23-May-12 4:27am    
What is the error you are getting. Please explain it. Click on Improve question and improve your question

First of all

XML
<title></title>
<script type = "text/javascript">
<html xmlns="http://www.w3.org/1999/xhtml">


the above code is not used in child page. these tags are already used in masterpage.hence not to be used now.

check with below code of javascript:

XML
<script type = "text/javascript" language="javascript" >


//This is the javascript function which will calulate the total
function calculate() {

var sub1 = document.getElementById('<%=txtOSIInterstFromBank.ClientID%>').value; // 
alert(sub1);
}

</script>


use this, because in contentplace holder the id of the control change.for better understanding, go to view source of browser, then see the id of your controls.

make it solution if you got your answer and dont forget to rate..

Thanks

Ashish
 
Share this answer
 
Use a javascript debugger such as Firebug or Chrome to step through your function and figure out what the problem is.

I *suspect* it's because you're using a Master page which will 'mangle' your control ID's, so txtOSIInterestFromDebent would become cph_100_txtOSIInterestFromDebent or something similar.

Have a look at this article.

Master Pages and JavaScript document.getElementById[^]

If it's not this, please provide more info on what 'its not working' means
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900