Check Variable

I am attempting to write a piece of code and I need to determine if a passed variable contains letters. My intVar1 is from a response.form which should be a number, but of course the user could input a string instead of a number in the form. This all works unless I give it something other than a number

Here is my current code:
if intVar1 <> "" Then
intFixVar1 =int(intVar1)
if intFixVar1 < 1 Then
Response.Write "my message"
else
if intFixVar1 > intVar2 Then
Response.Write "my other message"
else
intVar3 = intFixVar1
End if
end if
end if

View Replies


ADVERTISEMENT

Check Variable Exist

how asp can check whether a variable exist or not, like exist(name), or exist(hello)
return true and false.

View Replies View Related

Check If Variable Is Declared

i've had a few years experience in PHP, but i'm very very new to ASP. I need to display a line of text if the text exists, and show nothing if the text does not exist. I tried using a straight forward If Then statement asking if myVariable = "" to see if it's empty. The problem is i get an error telling me that myVariable has not been declared.

View Replies View Related

Check Box Equal To A Variable (moved From Html)

I Have a form, and in that form I have a check box, I wish to say " If Checkbox is checked Then variable = true Else Variable = false". Here is what I have as far as code goes...

Thus far the variable is always false, leading me to believe that my syntax is wrong. All the SQL part of this is tested as working (Included to give a perspective on what I am trying to do) so you can for the most part ignore it. It is the form part that has a problem. Code:

View Replies View Related

Back + Variable Change; Blank Check; & Open Popup

I have an ASP page that goes from part to part based off of a session variable. Is there any way to check for when the user clicks back so that I can change the variable. If not I will have to separate all of the pages out and that is just not fun.

So, when the user clicks back, the session variable gets changed. That is what I am looking for.

P.S. Is there a faster way to check if a variable is blank other than an
If Bleh="" Then
<some code>
End If

P.P.S. When a submit button is clicked, I want to open a new window with a message like "Be sure to fill out this on page X"

View Replies View Related

Create/Check For Cookie And Keep Persistent Variable For Tracking Referrals From Affs

How do I track a referral from an affiliate site through a cookie. I would like the aff links to be formatted

Code:

View Replies View Related

Calling Com + Object Variable Or With Block Variable Not Set

I'm turning my application into a "DLL". Everything worked fine untill I try to do a "While" in my asp code. Then I recieve an error like this:

"Object variable or With block variable not set"

My vb code look like this.....

View Replies View Related

Passing Data From Javascript Variable To Asp Variable.

is there any way of passing a javascript variable over to a asp variable so
i can write it to my database.

View Replies View Related

Convert ASP Variable To Javascript Variable

How do I convert an ASP variable to a Javascript variable?

View Replies View Related

How Do I Put A Variable And A Non Variable In A From Statement?

sql = "SELECT * FROM & console &'news'"

I got that right now but i want the variable, console to be placed along with news so when it selects from the db it selects from gcnnews or whatever variable it's on. How do I do that?

View Replies View Related

Variable-variable=junk

im trying to subtart one quantity from another then stick the answer in to an update statment, but all i get is an error in syntax message

variable math bit=
qty=request.form("oqty")-Request.form("qty")

sql =
sSQL="Update spares SET spares.location='"&request("location")&_
"',spares.machine='"&request("machine")&_
"',spares.part_desc='"&request("part_desc")&_
"',spares.part_number='"&request("part_number")&_
"',spares.qty='(" & qty & ") "&_
"',spares.min_qty='"&request("min_qty")&_
"',spares.updated_by='"&session("name")&"' WHERE(spares.id)=" & form_id

View Replies View Related

Variable Name, Dependant On The Value Of Another Variable...

I need to assign a value to a variable, but this variable name is dependant upon another variable!! I am including the code below so you can see it, cos if not I am sure you are thinking whattt?? Code:

View Replies View Related

Check For .Net From ASP

I'm working on a "hybrid" application some classic ASP, and some
asp.net. I'm trying to develop a support type page that checks necessary
components, database connections etc.. last item is to check for the .NET
extensions. Is there a way to do that from a classic ASP page?

View Replies View Related

Log Check In ASP

I am working on a website that requires a login before accessing an appointment book application written in ASP.Basically what I want to do is when the customer first clicks on "appointment_book" link, it takes them to the registration form. After they are registered, It will then redirect them to the actual application.
I also want the same thing to happen when a customer clicks on the login link. I want them to login, then get redirected to the appointment_book.
at the moment the customer click on the registratration link and it shows them the registration form, they are then automatically logged in after registration. However, when I click on the Appointment_book link again, it brings me back to registration form. How can I have the link always point to the appointment book after they are registered or logged in?

View Replies View Related

Check IP

let say:

http://www.domain1.com/index.asp?url=http://www.xxx.com/file.asp

can i restrict that only domain1.com can access to http://www.xxx.com/file.asp page?
so when user suft http://www.xxx.com/file.asp, they unable to view the content.both domain is on diff IP.

View Replies View Related

Check Box

I have a form with several check boxes.they are all set to default to "unchecked."The db also defaults to unchecked.But,as soon as we hit the "form1.recordset.addnew" all of the cb's change themselves to "checked."?

View Replies View Related

Age Check

Does anyone know of any nice ready made asp scripts to check a website's visitors age? I mean the sort of thing you see where you have to choose your day, month and year of birth from drop down lists to comply with US laws Code:

View Replies View Related

Check If Is Int

I'm trying to guard against SQL injection, but I have an ID number being embedded into a querystring for MSSQL table selection.

Is it good enough just to check if the querystring value is an int, if so could you quickly remind me how to check that. In PHP we use is_numeric or is_int.

View Replies View Related

Check If CDO.SYS

I moved an ASP app to a new Win03 server. The sendmail function using CDO in all ASP appls suddenly stopped working. It worked fine on the previous server (also Win03/IIS6.0). Where should I go to check?

View Replies View Related

Check If Page Is Down

I would like to check if a website is currently down, but don't know how to do this efficiently. I do not have access to the remote server. I have tried using XMLHTTP, and it worked, it just took a long time and I felt it wasn't effecient enough. Is there some other way to check if the website is up or not using ASP?

View Replies View Related

How To Check Value Is Null Or Not

how to check any value in asp that it is null or not.

View Replies View Related

Check 4 Email

I have a form that has simple vaidation but how do i check to make sure there is and email in the email section.

View Replies View Related

How To Check Given Value Is Numeric Or Not

How can I check that entered value in a text box is numeric or not in next page?

View Replies View Related

Check For Http?

I have a form that a user submits their clan's website, and roster page.
What I want to do, is check to see if the field submitted contained
"http://" and if not, add it to the field submission.

I know i can make this easier, and put the http:// in the field as a default
value, but i want to know how to do this with a bit of form validation or
something.

View Replies View Related

Check Duplicate Name

I have a signup form.

I would like to be able to check for duplicate entries during the signup.

E.g. Check for duplicate
1. Usernames
2. Phone numbers

How could this be achieved ?

My code basically is two fold.

1. A recordset that checks
if not recordset.bof and not recordset.eof then
'do something. And redirect to say the value exists
end if

2. Run a SP to do an insert and authentication

View Replies View Related

Unchecking The Check Box.

I've got a page that displays product details. One of the fields in my products table is called Include and is set to Yes/No. I use this to distinguish when I want to add that particular record to a recordset and when I don't. For example, I may have 20 products with the name Ash in them and create a recordset which pulls in all Ash products. However, I only want to pull them in when Include is set to Yes (the others aren't ready yet.)
I'm using Dreamweaver and I've setup my product details page to include that Include field with a checkbox. It checks the box if the Include field is set to True. What I would like to do, though, is be able to then uncheck that box and have it update that field to False, or No. Right now, when I uncheck the box and submit the form I can go back in and it's still showing up in that recordset and the box is still checked when I go to the details page.

View Replies View Related

Check This Numbers

i know how to code it in javascript but failed to do it in asp. there are 12 digits of number. exmple like this 871205106599. i want to check every single digit when user clicks Submit button.

View Replies View Related

Integer Check

when i set the checkScore1 to 100 or higher in the table field, the if else condition became FALSE? But it work for 70 to 99 ??

If checkMaxAttempt = "2" AND checkScore1 >= "70" Then
response.redirect "error.asp"

'last attempt check
ElseIf checkMaxAttempt <= "1" AND checkScore2 >= "70" Then
response.redirect "error.asp"

ElseIf checkMaxAttempt <= "0" Then
response.redirect "error.asp"

Else 'do nothing
End If

View Replies View Related

How Can I Check A Password?

I have a form and iwant to check if the password which gives the user is between 3 to 6 characters "alpanumeric" there is something in asp code to do this?

View Replies View Related

Check Browsers

Is there any If statement to check browsers?I want to check IE6, IE7 and Firefox.

View Replies View Related

Check Error

I have the following ASP...
set dbconn = server.createobject("ADODB.connection")
dbconn.open "dsn=news;uid=hello"

After the dbconn.open, how do I check if the dbconn.open has an error?
e.g. if dbconn has error
do something

View Replies View Related

Session Check

I want to use the session check in this The drawback of this page is that anyone can click any no. of time on the options of the poll. So, I want to put a session check so that only once can a person tick the answer. How can this be done?

View Replies View Related

IsNull Check

In my functions I'm using a double-check all the time to trap if a value has
nothing in it and my question is do I need this double-check.
My check line is:

IF IsNull(xxx) OR LEN(xxx) = 0 THEN

blah blah

ELSE

blah blah

END IF

xxx is usually an array built up of data from an ADO recordset so will
LEN(xxx) = 0 cover my zero values or do I still need the IsNull check as
well?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved