473,748 Members | 5,242 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with function updateSum(id)

263 Contributor
Hi there.

I have a problem with function updateSum(id).

The code is this:

[php]

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


function updateSum(id)
{

var frmObj = document.frmEnq uiry;

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


}


var timerID = null;

window.clearTim eout()

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


function deferUpdate(id)
{

if (timerID != null) window.clearTim eout(timerID);


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

//-->
</script>

<form method="POST" name="frmEnquir y" ...>

<input type="text" name="netto_2_x _100_<%= strID %>" onkeyup="deferU pdate(<%= 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(frm Obj["netto_" + id].value) * 0.02).toFixed(2 );
[/php]



Can you help?
Thanks

Viki1967
Dec 1 '07 #1
3 1457
gits
5,390 Recognized Expert Moderator Expert
could you trace what the passed id is?

kind regards
Dec 2 '07 #2
viki1967
263 Contributor
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 Recognized Expert Moderator Expert
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
4764
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 same directory) is to change the content of a layer, created with the <div...> tag, with an external text (clicking over an hiperlink) or with the result of a <form...> submition. The solution (I haven't been able to find anyone else) is to use a...
1
20698
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 init() {
7
2439
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 double, I have to define a global operator+ (or -*/) and special function classes. --- source begins here ---
4
3461
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 anchors. I understand that the anchors array creates an element for each anchor in the page when the page is loaded, but how do I identify which anchor is currently being viewed? Here's some pseudo code: if (document.anchors.name == "section_B") {
8
1500
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 undefined. The show_hide_Div function is meant to be called when a Radio button is selected. See below. Can anyone help function show_hide_Div(theDiv,DivsToHide,TheDivToShow) { elDiv = document.all.theDiv;
24
9898
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 id="MyTest" style="position:absolute;top:0px;left:0;height:12;width:12;text-align:center">'+MyString+'</div>'); Now if MyString contains 6 characters, I end up with 6 <div id="MyTest"> containers. With IE I am able to access these containers as...
6
5581
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 object collection and stanrd using it it starts to fall apart. Clearly there is something about javascript's usage of passing "By ref" that i am not getting. i have had a look on the web and found some examples, but i cant see why my code does not...
1
1484
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 other page. It works fine the first time i click on the button but if i click again the value isn't assigned anymore. This is the function on the parent page: <SCRIPT language=javascript> function Id(){ var id = frm1.PersonId.value;...
5
1617
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 tree_list($parent, $level,$id) { // retrieve all children of $parent $result = mysql_query('SELECT cname,cid FROM kategorie '. 'WHERE parent="'.$parent.'";'); while ($row = mysql_fetch_array($result)) {
0
9534
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9366
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9316
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9241
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6793
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4597
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2211
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.