473,402 Members | 2,055 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,402 software developers and data experts.

Reference Active Page from Include

jp
Hi,

I have written a function that adds up numeric values from a multiple
textfields on a page and writes the sum to the total textfield. I would like
to move this from the page to an include so I can re-use on multiple pages.
How do i reference the active page in my script. This is an excerpt from the
function...

<script type="text/javascript">
function calctot(section)
{
if (section == "A")
{

/* Section A1 */

A = (document.frmSRData.A_BCI_RI_Public_Prod.value * 1) +
(document.frmSRData.A_BCI_RI_Public_Perf.value * 1);
document.frmSRData.A_BCI_RI_Public_SubTot.value = A;

B = (document.frmSRData.A_BCI_RI_Private_Prod.value * 1) +
(document.frmSRData.A_BCI_RI_Private_Perf.value * 1);
document.frmSRData.A_BCI_RI_Private_SubTot.value = B;
....

Do i need to pass a parameter to the function for the active page? Any help
with the syntax appreciated.

thanks,

jp
Jan 18 '06 #1
1 1148
jp
Cheers - I find I am liking javascript more & more :)
"Lee" <RE**************@cox.net> wrote in message
news:dq*********@drn.newsguy.com...
jp said:

Hi,

I have written a function that adds up numeric values from a multiple
textfields on a page and writes the sum to the total textfield. I would
like
to move this from the page to an include so I can re-use on multiple
pages.
How do i reference the active page in my script.


When the script is included in a page, it becomes a part of the active
page.
All references to "document" refer to the active page.

Jan 19 '06 #2

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

Similar topics

6
by: THE BIG MAN | last post by:
I am getting the errror Active Server Pages error 'ASP 0141' Page Command Repeated /contactform.asp, line 12 The @ command can only be used once within the Active Server Page. Anybody know...
9
by: Mario Rodriguez | last post by:
Hi people. I have a problem adding users to Win2003 active directory programatically. When I execute my app throws the following exception: .................The specified directory service...
3
by: Amit | last post by:
Hi when I try to run LIST ACTIVE DATABASES AT DBPARTITIONNUM <partnum> or LIST ACTIVE DATABASES GLOBAL, I always get an error message. Does anyone know why? I'm on v8 fp 5 output : db2 => list...
1
by: Jason Dunbar | last post by:
Whilst creating a class to search Active Directory domains and retrieve user details, I ran into the following error:- Object reference not set to an instance of an object. Here's the error...
1
by: Andrew | last post by:
Hey all, Working on revamping our Intranet here and making use of the LDPA, Active Directory, Directory Services, etc. that .Net provides. I am still fairly new on this subject, so the problem...
9
by: Moe Sizlak | last post by:
Hi There, I am trying to write the selected value of a listcontrol when a button is clicked and I keep getting the error "object not set to a reference of an object". The libox itself is in a...
2
by: Ben | last post by:
I have several pages written in aspx, but sometime the aspx page return the following error. And it hapeen, the whole web application gives this error, that means all the aspx files get affected....
7
by: Steve Bugden | last post by:
Hi, I am trying to reference an html page from an aspx file. The intention is that the html file will contain the content for my web site and the aspx will contain the navigation, logo etc. Then...
3
by: nemo | last post by:
Hi, My application works fine on the localhost but spits this error as soon as I put it on the server. I know this error occurs when an object has not been instantiated prior to a reference, but...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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,...
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
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...
0
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...

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.