473,320 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

JScript within an asp page question

I know this is an asp newsgroup, and I've gotten help from
the group on several asp related questions, but I was
hoping someone could answer a JScript question

I wrote this script that was working, now it isn't. What
it does is simply place the value of a checkbox, when
clicked, into a text field and then sum the total of any
checked boxes into another text box. Unchecking the check
box will subtract the total. The checkboxes call two
functions with the OnClick event handler

OnClick="addNumbers(); setTextField(this.form)"

where TextField is the name of the field I want the value
of the checkbox to go. The setTextField Function works
fine. All of a sudden the addnumbers is giving a NaN in
the total box instead of summing it up. Here is the
addnumbers Script

<!--
function addNumbers()
{
var test = 0;
test = parseFloat(document.forms[0].Field77.value);
var num1 = 0;
num1 = parseFloat(document.forms[0].Field78.value);
var num2 = 0;
num2 = parseFloat(document.forms[0].Field79.value);
var num3 = 0;
num3 = parseFloat(document.forms[0].Field80.value);
var num4 = 0;
num4 = parseFloat(document.forms[0].Field81.value);
var num5 = 0;
num5 = parseFloat(document.forms[0].Field82.value);
var overdue = 0;
overdue = parseFloat(document.forms[0].Field83.value);
var qtotal = (test + num1 + num2 + num3 + num4 + num5
+ overdue);
document.forms[0].charge_total.value = qtotal;

}
// End -->
</script>

Can anyone see why this would return a NaN, when the
function is called when a checkbox is clicked? Am I
missing a semicolon or something? Thanks

Jul 19 '05 #1
1 1808
Damian Greene wrote on 01 jul 2003 in
microsoft.public.inetserver.asp.general:
I know this is an asp newsgroup, and I've gotten help from
the group on several asp related questions, but I was
hoping someone could answer a JScript question


This asp group will answer questions about
both serverside(!) vbscript AND j(ava)script.

however for your clearly clientside question
I would suggest you ask this in:

microsoft.public.scripting.jscript

or

comp.lang.javascript
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Harag | last post by:
Hi All. I'm stating out doing some web developing. I was wondering which of the server side languages should I concentrate on and learn. I Know CSS, HTML, T-SQL I can look at the client...
4
by: Mark D. Anderson | last post by:
About a month ago Richard Cornford did an interesting analysis of a memory leak in jscript (internet explorer) when there are "circular" references between DOM objects and (real) jscript objects:...
6
by: Dan Roberts | last post by:
I am running some off-the-shelf software that is written in ASP, which uses JScript to generate dynamic content within HTML forms. There are several ASP pages which are partially rendering to IE,...
10
by: SergioT | last post by:
Hi I wanna to create a jscript function that sets the value of a textbox into a datagrid, But the problem is How can I obtain the name of the textbox and send it to my jscript function???? The...
4
by: RFS666 | last post by:
Hello, I have the following problem: I have a web project where I display an activeX control that displays 2D-graphs on an aspx-page. I use jscript to access and modify the properties of the...
6
by: RFS666 | last post by:
Hello, After I posted yesterday "using C# class in jscript", I have a new problem: I have a C# class - DBResult - that contains (and other variables) a string array (and other variables), that...
7
by: RFS666 | last post by:
Hello, I would like to use variables with a type in jscript.NET. I declare them as follows: var x : double = 5.03; This doesn't work in my script, that I write to the page in codebehind with...
2
by: tunk | last post by:
I dont know where to start my question so let me tell you my story :) The ASP that cause me trouble is running on IIS that set ASP default language to JScript instead of VBScript. This ASP page...
1
by: Andrew Wan | last post by:
How can VBScript code access JScript code variables in the same ASP page? <SCRIPT LANGAUGE="VBScript"> Dim a a = 10 </SCRIPT> <SCRIPT LANGUAGE="JScript"> Response.Write(a); </SCRIPT>
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.