ASP Addition Code
<%
dim n, c, t
n = request("number")
c = request("cost")
t = c+n
%>
This code returns 43 for c=4, n=3 instead of the sum 7. Do I need any thing else?
<%
dim n, c, t
n = request("number")
c = request("cost")
t = c+n
%>
This code returns 43 for c=4, n=3 instead of the sum 7. Do I need any thing else?
i cant open any project in ASP.Net and neither can a create a new one
I have two strings that instead of adding them together to get the sum the are concatenating together.Does anyone know how I can get these two to add
while not rstemp4.eof
vservdate = rstemp4("servdate")
vdesc = rstemp4("desc")
vservhours2 = rstemp4("servhours")
vtravelhours = rstemp4("travelhours")
vtech = rstemp4("tech")
shvar = shvar + rstemp4("servhours")
thvar = thvar + rstemp4("travelhours")
rstemp4.movenext
wend
I am trying to add the values of a form. The results keep getting treated as a string and not an integer. So with :
theForm1 = Request.Form("number1")
theForm2= Request.Form("number2")
thetotal = theForm1 + theForm2
Response.Write(thetotal)
If the value of theForm1 is 4 and the value of theForm2 is 5, thetotal is 45, instead of 9.
how to add two numbers from two different textboxes and display it in the third box.
View Replies View RelatedThe problem i am having is adding 2 rs values to each other to come up with an amount.
so i have something like the following:
sql1 = "select sum(col1 + col2 + col3) as result1 from table where col4 = "y" "
set RS1 = Conn.Execute(SQL1)
pastdue1 = formatnumber(rs1("result2"))
sql2 = "select sum(col1 + col2 + col3) as result2 from table2 where col4 = "y" "
set RS2 = Conn.Execute(SQL1)
pastdue2 = formatnumber(rs2("result2"))
pastduefinal = (pastdue1 + pastdue2)
But when i do a response.write (pastduefinal) i get "0.000.00"
Does anyone have any idea? I replaced the formatnumber with formatcurrency but still didnt work. Am I using the addition incorrect?
I have a database with three feilds
Tbl_counter
ID
NAme
Count
Evertime the user clicks on a button in the asp page. I want to subtract on from their Count feild and then reinsert that value back into the database as ther new count value.
I presume it simply does not hold the variables?
On selection (could just as easily be a text field) I want to do two thing.
1) See how many times the script is run, after 5 attempts go to next page.
2) When a number is selected/typed in it should be added to the previous number
Basically I want to stop the page at either a number of loops if it reaches 5 or when the total summing of numbers equals say 4. Code:
Can I add two request objects?
View Replies View RelatedI have 2 radio buttons, Yes and No. I have a text box with a value entered by the user. If the user selects the Yes radio button, I need to add 339 to the value they entered. They will submit the form to add the value...but the problem I am getting is, it keeps adding 339 more than once. If there is also a way...where they select yes and submit and go back to no...to set the value back to the value they entered.
How can I add 339 to a value the user entered without continuing to add 339 if the form is submitted multiple times?
I am trying to build the code that will add a specific column's column where something = something
Example
ID Name Amount
1 Bill 10.00
3 Ted 15.00
1 Bill 25.00
1 Bill 35.00
4 Jude 5.00
In basic word terms, this will describe what I am seeking:
SUM(amount column where ID = 1) ..... answer would be 70.00
I am already connected to the database and can pull out one specific field in a column, just can not add that column.
A starting price grabbed from querystring is shown to begin with. Then the options are shown(prices next to them) with checkbox(populated with over 90 options) and the user selects the options and a new total comes up upon submit. So the total of the options is a subtotal and the home and options together is the grand total. Code:
View Replies View RelatedI have current date and iam getting by GETDATE() function. Now i would like to add coming 12 business days in this date. e.g ( today is 1st Feb and if i add 12 business days in this date then the date i will get 17th Feb).
how to do it. I know there are some functions in SQL server which can be used to get the business days. Please some one tell me how is it possible.
below is the code which is used for adding items and then displays the item
which is working fine i have a problem when i display the item if the user press f5 or does refresh it increases the qty.
so if u look at the code i get the product details from a earlier page if the qty which i get is 2 and then i do a refresh on the page the qty becomes 4 is there any way to stop it Code:
I'm looking for sample code that will require a use to enter a code from a scued image format.
I'm sure you've seen them before where the image is barely readable by a human and the user has to enter the code correctly to submit the form.
I'm looking for ASP code and NOT ASP.NET code as I am supporting a legacy site.
do you know of any asp code that makes a pdf on the fly.
if there's none do you know of a good, not-so-expensive and easy-to-implement component?
Is there any way that I can store my ASP code in an Access DB and have it display that way? Ideally, I would like to make a page with a text area that I can write and edit code in, and then when I submit it, I would like to view the page that the code creates. The code in the DB would include code that selects from and updates the DB.
I would like to do this because I can't work remotely now.
What is wrong with my code?
This is the error.
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'CLASSDATE >= 6/23/2004 ORDERBY CLASSDATE'.
This is the code.
Code:
strSQL = "Select * FROM WellClass WHERE CLASSDATE >= " & DATE & " ORDERBY CLASSDATE"
I am trying to follow the W3Schools tutorial on the XMLDOM object, and it works fine in a regular HTML document inside <script> tags (vbscript), but I am trying to do it in the ASP tags (<% %>) and it does not work.
The error says:
Code:
Microsoft VBScript runtime (0x800A01A8)
Object required: '[object]'
I am trying to do something with it and I can figure out what to do!I have created a database that lets realtors track clients, potential clients, and offers made. Here is a link to the database:(URL address blocked: See forum rules)
What I am trying to do is create a form that lets a user enter his first name, last name, email, and offer amount into textboxes. When they click send it adds their information to the Potential Buyer table (the primary key is an auto generated number.) The offer table is basically an associative table, containing the following information: buyer$buyerid, client$clientid, and amount. I would like the amount to be added to this table, and I would like it to also add the newly created buyerid. My problem is that well, I have no idea how to do this, as the buyerid is created only seconds before I need to post it in the offer table. Could anyone help me out with this? I'd really appreciate it.
Im a novice with ASP and no idea of PHP, can Any one help me convert this to ASP...
$rss = $_GET['rss'];
if ($rss && $rss != ""){
if ((strpos($rss, "http://") === 0) || (strpos($rss, "https://") === 0)){
readfile($rss);
}
}
Here's the current code that I'm using for navigation through some pages. MY question is, I want the item "System-Add Ons" to still stay bolded if I'm on a page that's in a subset of "Products" Is this possible?
For example, if a user gets to the page "Monitors," (monitors.asp) I want System-Add Ons to stay bolded....
How can I set up subsets of the "Products" page? Do I have to make a directory and do a test if the page is in the directory "Products" and is affiliated with "Products?" Code:
how to get the content or information of other web site using asp code.
View Replies View Relatedis there any way in asp to execute a pop-up window when a condition in an if statement is satisfied
View Replies View RelatedI Wanna to know that which of below codes related to
ADO within ASP (VBscript) is better?
CODE ONE ::
rsEduCalender.CursorLocation=3
With rsEduCalender
if .State=1 then .Close
.Open SQLstr,cn,3,1
End With
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''
CODE TWO::
With rsEduCalender
if .State=1 then .Close
.CursorLocation=3
.Open SQLstr,cn,3,1
End With
figure out what the ASP code is to email a form?
View Replies View Relatedi created ASP page for Online TEST
it Consist three pages
First Page is Selection of Topic and Number of Questions from List Box.
Second page is shows the Questions as per the Selection in previous page Datas from the Database.
Third Page is Result Page.
But My problem is in Second Page, because all the question are created dynamicaly so that how can i get the User answer
I get the question id and correct answer for all the questions.
but i need to get the user answer for Result.I attached my code for the second page.
Is there a program or website that will validate my asp pages?Kind
of like how html pages can be validated on
http://www2.imagiware.com/RxHTML/ and on http://netmechanic.com
this is what i am doing for zip codes
i want user to enter zip codes like this
92274
92274-0965
so if the user enters zip code like this 92274 then its right
but if he enters zip codes like this 922740965 then change it to 92274-0965
this is what i have done so far so i have got the values of first 5 i need to include a -and then the rest of the numbers any idea how to make this work
I need some code to test whether my connection is open in an asp page. Something like this:
<%
IF NOT connection is open THEN
Connection string code here
END IF
%>
I know how to write the connection string, it's the first part of testing whether it's closed or not that I don't know.
I have two tables, raceresultsview and jockeyselections.
In jockeyselections, I have jockey names and stableid, for example Pat
Day, stableid 1000.In raceresultsview, I have jockey names, and placement.
I want to do something like this:
select * from raceresultsview where jockey in (select jockey from
jockeyselections). This works FINE, but I need to figure out how to grab
the stableid, too.Each time there is a match, I want to insert the stableid and placement
into the table named winnings.
in 3 tier wed based application ..i want to run my vb code seprate for debug purpose...how can i do this>
View Replies View RelatedHeres my for next loop. Basically it is pulling files from a folder. Now I want it so that if it reaches the end of all of the files, that it starts over at the beginning. Any ideas? Code:
View Replies View Related