473,320 Members | 1,862 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.

embed asp in html

JT
ok - here is my problem:

i have a page that dynamically displays payment info for accounts. since
each account differs in the number of rows to display, i loop through my
recordset and use the following asp embedded html:

<input type="text" style="TEXT-ALIGN: right"
value="<%=formatnumber(rsOldPaymentInfo.Fields("sc heduled_amount"),2)%>"
name="<%=scheduled_amount_row%>" align="right" style="FONT-SIZE: xx-small;
width=50px">

i need to get a sum of these amounts and i am doing this for validation so i
need the values that are posted to the page, not the values retrieved from
the recordset.

so i know that i need to declare a variable that will record a tally of the
amounts posted: something like:

mySum = mySum + Response.Write("<input type="text" style="TEXT-ALIGN: right"
value="<%=formatnumber(rsOldPaymentInfo.Fields("sc heduled_amount"),2)%>"
name="<%=scheduled_amount_row%>" align="right" style="FONT-SIZE: xx-small;
width=50px">")

--but i don't know how to get this tally correctly

any thoughts???
tia
jt
Jul 19 '05 #1
4 6838
Gazing into my crystal ball I observed "JT" <je******@sppinc.net> writing
in news:uj**************@tk2msftngp13.phx.gbl:
ok - here is my problem:

i have a page that dynamically displays payment info for accounts.
since each account differs in the number of rows to display, i loop
through my recordset and use the following asp embedded html:

<input type="text" style="TEXT-ALIGN: right"
value="<%=formatnumber(rsOldPaymentInfo.Fields("sc heduled_amount"),2)%>"
name="<%=scheduled_amount_row%>" align="right" style="FONT-SIZE:
xx-small; width=50px">

i need to get a sum of these amounts and i am doing this for validation
so i need the values that are posted to the page, not the values
retrieved from the recordset.

so i know that i need to declare a variable that will record a tally of
the amounts posted: something like:

mySum = mySum + Response.Write("<input type="text" style="TEXT-ALIGN:
right"
value="<%=formatnumber(rsOldPaymentInfo.Fields("sc heduled_amount"),2)%>"
name="<%=scheduled_amount_row%>" align="right" style="FONT-SIZE:
xx-small; width=50px">")

--but i don't know how to get this tally correctly

any thoughts???
tia
jt


mysum = mysum + rsOldPaymentInfo.Fields("scheduled_amount")

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
Jul 19 '05 #2
JT
but that would give me a sum based on what is returned from the db - i need
this for client side validation so i need to get the amount that the user
typed in, not the amount retrieved.

any other thoughts???
"Adrienne" <ar****@sbcglobal.net> wrote in message
news:Xn****************************@207.115.63.158 ...
Gazing into my crystal ball I observed "JT" <je******@sppinc.net> writing
in news:uj**************@tk2msftngp13.phx.gbl:
ok - here is my problem:

i have a page that dynamically displays payment info for accounts.
since each account differs in the number of rows to display, i loop
through my recordset and use the following asp embedded html:

<input type="text" style="TEXT-ALIGN: right"
value="<%=formatnumber(rsOldPaymentInfo.Fields("sc heduled_amount"),2)%>"
name="<%=scheduled_amount_row%>" align="right" style="FONT-SIZE:
xx-small; width=50px">

i need to get a sum of these amounts and i am doing this for validation
so i need the values that are posted to the page, not the values
retrieved from the recordset.

so i know that i need to declare a variable that will record a tally of
the amounts posted: something like:

mySum = mySum + Response.Write("<input type="text" style="TEXT-ALIGN:
right"
value="<%=formatnumber(rsOldPaymentInfo.Fields("sc heduled_amount"),2)%>"
name="<%=scheduled_amount_row%>" align="right" style="FONT-SIZE:
xx-small; width=50px">")

--but i don't know how to get this tally correctly

any thoughts???
tia
jt


mysum = mysum + rsOldPaymentInfo.Fields("scheduled_amount")

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com

Jul 19 '05 #3
Javascript.

First, you'll need to add the ID tag to your input boxes with the same value
as the name, and do something with the name and id that makes them
identifiable, as a box you want to sum like naming them
name="schedBox<%=scheduled_amount_row%>". You could also assign them a
specific CSS class (i.e. class="SUMBOX") and then search on their style
property, or you could just assume that all textboxes should be summed.
Then, you can put something like the following into your web page:

<SCRIPT language="javascript">
function CheckSum()
{
var oTextBoxes=document.getElementsByTagName("input");
var oTextBox;
var total;

for (i=0; i < oTextBoxes.length; i++)
{
oTextBox=oTextBoxes[i];
if (oTextBox.name.search("schedBox") != -1)
{
total+=oTextBox.value;
}
}
//Do something with the total
}
</SCRIPT>
Robert
"JT" <je******@sppinc.net> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
but that would give me a sum based on what is returned from the db - i need this for client side validation so i need to get the amount that the user
typed in, not the amount retrieved.

any other thoughts???
"Adrienne" <ar****@sbcglobal.net> wrote in message
news:Xn****************************@207.115.63.158 ...
Gazing into my crystal ball I observed "JT" <je******@sppinc.net> writing in news:uj**************@tk2msftngp13.phx.gbl:
ok - here is my problem:

i have a page that dynamically displays payment info for accounts.
since each account differs in the number of rows to display, i loop
through my recordset and use the following asp embedded html:

<input type="text" style="TEXT-ALIGN: right"
value="<%=formatnumber(rsOldPaymentInfo.Fields("sc heduled_amount"),2)%>" name="<%=scheduled_amount_row%>" align="right" style="FONT-SIZE:
xx-small; width=50px">

i need to get a sum of these amounts and i am doing this for validation so i need the values that are posted to the page, not the values
retrieved from the recordset.

so i know that i need to declare a variable that will record a tally of the amounts posted: something like:

mySum = mySum + Response.Write("<input type="text" style="TEXT-ALIGN:
right"
value="<%=formatnumber(rsOldPaymentInfo.Fields("sc heduled_amount"),2)%>" name="<%=scheduled_amount_row%>" align="right" style="FONT-SIZE:
xx-small; width=50px">")

--but i don't know how to get this tally correctly

any thoughts???
tia
jt


mysum = mysum + rsOldPaymentInfo.Fields("scheduled_amount")

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com


Jul 19 '05 #4
On Thu, 9 Oct 2003 11:19:31 -0500, "JT" <je******@sppinc.net> wrote:
but that would give me a sum based on what is returned from the db - i need
this for client side validation so i need to get the amount that the user
typed in, not the amount retrieved.
Either check it client side, or if it has to be ASP use the exact same
method, only reading the data from the form input. For client side,
try a Javascript group.

Jeff
"Adrienne" <ar****@sbcglobal.net> wrote in message
news:Xn****************************@207.115.63.15 8...
Gazing into my crystal ball I observed "JT" <je******@sppinc.net> writing
in news:uj**************@tk2msftngp13.phx.gbl:
> ok - here is my problem:
>
> i have a page that dynamically displays payment info for accounts.
> since each account differs in the number of rows to display, i loop
> through my recordset and use the following asp embedded html:
>
><input type="text" style="TEXT-ALIGN: right"
> value="<%=formatnumber(rsOldPaymentInfo.Fields("sc heduled_amount"),2)%>"
> name="<%=scheduled_amount_row%>" align="right" style="FONT-SIZE:
> xx-small; width=50px">
>
> i need to get a sum of these amounts and i am doing this for validation
> so i need the values that are posted to the page, not the values
> retrieved from the recordset.
>
> so i know that i need to declare a variable that will record a tally of
> the amounts posted: something like:
>
> mySum = mySum + Response.Write("<input type="text" style="TEXT-ALIGN:
> right"
> value="<%=formatnumber(rsOldPaymentInfo.Fields("sc heduled_amount"),2)%>"
> name="<%=scheduled_amount_row%>" align="right" style="FONT-SIZE:
> xx-small; width=50px">")
>
> --but i don't know how to get this tally correctly
>
> any thoughts???
>
>
> tia
> jt
>
>
>


mysum = mysum + rsOldPaymentInfo.Fields("scheduled_amount")

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com


Jul 19 '05 #5

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

Similar topics

1
by: Failure | last post by:
I want to embed html in my xml document. What tag must I use to prevent the parser from parsing the html? TIA!
11
by: Anna | last post by:
Hi all. I want to embed the EMBED tag in the object tag. I understood that I need to provide a PARAM tag inside the OBJECT whose value will hold the content of EMBED src attribute, but after...
2
by: Cris Curtis | last post by:
When I use an embed tag that uses a dynamic aspx page, the dynamic aspx page appears to get called 2 times instead. Below is code that adds an embed tag to a placeholder control that will use...
24
by: Manuel | last post by:
Is it possible to embed an image, like a company logo in a CDOSYS generated message? If yes, I´ll apreciate some code sample. I´ve been able to format messages in html the way I like, but I...
1
by: Andrew Poulos | last post by:
With "normal" SWF HTML there's an EMBED tag nested within an OBJECT tag. How can I check which tag is actually displaying the SWF? I'm using CSS on them and the style on the OBJECT affects the...
6
by: qualitychecker | last post by:
Hello thanks for your help.. I try to reference a PHP module from within a HTML file, see below ---------------------------------------- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">...
13
by: Ben Sharvy | last post by:
I'd like to bring a page into HTML 4 compliance, but I can't understand the information about the <OBJECTtag that I read at help sites. I have this in a page: <embed src="soundfile.mov"...
2
polymorphic
by: polymorphic | last post by:
I am no longer good at Javascript and need help. I'm trying to embed pdf files in html then build some sort of navigation between the pdfs via the pdf numbered file name. I can generate the...
0
by: howa | last post by:
Consider a simple HTML: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>YUI</title> <link rel="stylesheet"...
2
dream party
by: dream party | last post by:
Inserting a Flash (SWF, FLV) file into HTML web page is already an old and familiar thing to all of us. It is a rather non-flexible thing that just to edit some options in the template. However, I...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.