473,388 Members | 1,326 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,388 software developers and data experts.

Problem with function updateSum(id)

263 100+
Hi there.

I have a problem with function updateSum(id).

The code is this:

[php]

<script language="javascript" type="text/javascript">
<!--


function updateSum(id)
{

var frmObj = document.frmEnquiry;

frmObj["netto_2_x_100_" + id].value = (parseFloat(frmObj["netto_" + id].value) * 0.02).toFixed(2);


}


var timerID = null;

window.clearTimeout()

var flTimeout = (typeof(window.setTimeout) != "undefined" &&
typeof(window.clearTimeout) != "undefined");


function deferUpdate(id)
{

if (timerID != null) window.clearTimeout(timerID);


if (flTimeout) timerID = window.setTimeout("timerID = null; updateSum(" + id + ");", 400);
else updateSum(id);
}

//-->
</script>

<form method="POST" name="frmEnquiry" ...>

<input type="text" name="netto_2_x_100_<%= strID %>" onkeyup="deferUpdate(<%= strID %>)">
[/php]

The error is:

'undefined' it is null or not an object

On the line

[php]
frmObj["netto_2_x_100_" + id].value = (parseFloat(frmObj["netto_" + id].value) * 0.02).toFixed(2);
[/php]



Can you help?
Thanks

Viki1967
Dec 1 '07 #1
3 1442
gits
5,390 Expert Mod 4TB
could you trace what the passed id is?

kind regards
Dec 2 '07 #2
viki1967
263 100+
Your's Sincerely, but the problem was server remote what a not working, no this script.

Now it is ok.

Viki1967
Dec 2 '07 #3
gits
5,390 Expert Mod 4TB
glad to hear you got it working ... post back to the forum anytime you have more questions :)

kind regards
Dec 2 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Federico Bari | last post by:
Good morning all from italy, i have probably a compatibility problem with a html/javascript page. The aim of the code of the file test.htm you find here following (copy the 3 files in the...
1
by: Covad | last post by:
Hi all, For some reason my change() function is only called when the page loads. I'd much rather it gets called when the select changes. Here's the code: window.onload = init; function...
7
by: Emanuel Ziegler | last post by:
Hello, I want to do some mathematics with functions. In my case the function classes are very complex, but this simple example has the same problems. To allow calculations that begin with a...
4
by: deko | last post by:
I use named anchors to take users to specific parts of a long page. But I want to add some processing and do some things with my nav bar when users go to certain sections delineated by named...
8
by: Joseph | last post by:
I am attempting to create a function that will hide all SPANS within an ided DIV ="idMain", then only display one span, but this function gives an error when it gets to elChildElement as being...
24
by: Robi | last post by:
I have the following problem: I populate a page with a specific amount of <div id="MyTest"> containers inside another <div> container. for (i=0; i < MyString.length; i++) document.write('<div...
6
by: ged | last post by:
Hi, i am a oo (c#) programmer, and have not used javascript for a while and i cant work out how javascript manages its references. Object References work for simple stuff, but once i have an...
1
by: ze colmeia | last post by:
Hi all, I have a little javascript function that assigns the value from a parent window to a field on a iframe. The function is on the parent page and its called by a button onclick() event on the...
5
by: Milan Krejci | last post by:
the thing is that descentant branches i dont want to expand do expand. $id variable contains an array of branches i want the program to go through (alcohol's id -beer id etc) function...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.