Solved

java script using RadNumericTextBox

Posted on 2010-09-23
4
938 Views
Last Modified: 2012-05-10
what is wrong with this: the text boxes are all RadNumericTextBox

 function calcTotal()
{    
document.getElementById('txtTotalPrice').set_value = document.getElementById('txtPricePerUnit').get_value * document.getElementById('txtQuantity').get_value

return true;
}
0
Comment
Question by:vbnetcoder
  • 3
4 Comments
 
LVL 51

Expert Comment

by:HainKurt
ID: 33748648
what is set_value & get_value?
0
 
LVL 51

Expert Comment

by:HainKurt
ID: 33748659
maybe this is enough

<script>
function calcTotal(){
  document.getElementById('txtTotalPrice').value = document.getElementById('txtPricePerUnit').value * document.getElementById('txtQuantity').value;
}
</script>
0
 

Author Comment

by:vbnetcoder
ID: 33748738
0
 
LVL 51

Accepted Solution

by:
HainKurt earned 500 total points
ID: 33750060
you should use

<script type="text/javascript">
var txtTotalPrice= $find("<%= txtTotalPrice.ClientID %>");
var txtPricePerUnit= $find("<%= txtPricePerUnit.ClientID %>");
var txtQuantity= $find("<%= txtQuantity.ClientID %>");
txtTotalPrice.set_value = txtPricePerUnit.get_value * txtQuantity.get_value
</script>

I guess ;)
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Passport Expiry 3 45
"Pause" execution of javascript function for x miliseconds 2 29
How to show span when clicked on? 10 22
how can i get the string decoded ? 2 14
In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question