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
ADVERTISEMENT
im trying to set a variable to = a name plus anumber next to it for incriminents soo
name = response.write "vac" & + inc 1 or something im not sure
vac1
vac2
vac3
vac4
and so on
View Replies
View Related
I'm trying to calculate the total time using values from database I run a select statement to find the timein column in my database.
Now how do i assign the result to a variable so that it can be used? There is only going to be one result because i'm checking it against an autonumber field. that is used as time 1. Code:
View Replies
View Related
I have an SQL database that tracks workorders for my company. Each workorder is ID'ed by a number, i.e.: 1234. The next would be 1235, 1236, etc. I need a loop to go through EVERY workorder in the database.
How do I set a variable = to the largest WorkorderID in the database? i.e.: That would be 1500 if there were 1500 workorders in the database. Don't worry, there are other checks in place so that it won't always loop through every single workorder (I thought about that already).
View Replies
View Related
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
View Related
how asp can check whether a variable exist or not, like exist(name), or exist(hello)
return true and false.
View Replies
View Related
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
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
I have been tasked to manage an internal support web based system currently connecting to a local web server based MDB. I want to move this backend to a SQL DB on another server and use that instead as i plan on this support system growing fairly large, also trying to standardise on DB locations. Code:
View Replies
View Related
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
I am loading up a site for my boss to look through, I want to put it in my templates folder so they can surf it just like they would if it was loaded in the www page. The problem I am having is with my asp pages interaction with my database. I put my database in a folder called test in my templates folder (/templates/test/db)Now when I run the query I get this back:
Microsoft JET Database Engine error '80004005'
Operation must use an updateable query.
/templates/insertit.asp, line 22
I checked the folder and it is rw-rw-rw.
If I load this page is the www folder and adjust the map path it works excellent. Does anyone know what could be wrong? Here is my code:
View Replies
View Related
I suspect this is a rather easy one however. I recently moved a web site developed by MS Front Page and a SQL Server database to a different computer. Now when I "Submit" field data, it no longer populates the database.
I've checked the main index.asp file and the global.asa file to find out how to repoint the form to the database and I can't figure it out. Can anyone give me any pointers?
View Replies
View Related
I got a new server with Windows 2003 on. I moved a site that works fine from a Windows 2000 server. On many pages i get a convertion like this:
|Microsoft VBScript runtime error '800a000d'
|Type mismatch
|
|/test/test.asp, line 3
|
This is the code that i run to get the error:
|<%
| a = 1
| if a = 1 then response.write("a = 1")
|%>
|
It does work if i add "if cint(a) = 1 then...." but is it a way to make IIS6/ASP don't check the code so critical?
View Replies
View Related
I'm having a problem whenever i enter 2 response.redirects() in one funcion.. it's weird. What i'm trying to do is to display a simple error message underneath a login. But i'm trying to do it by sending the user back to the SAME page (not sure if that's even possible!) and passing a variable, notLogged, to test against. I hope this makes sense! Code:
View Replies
View Related
the operator for the following bit in the bold?
[vbs]
If variable1 Does Not Equal variable2 Then
'Do something
End If
[/vbs]
View Replies
View Related
I am having trouble with this SQL statement:
SQLString = "SELECT * FROM WebVacanciesUpload WHERE (Category='"& Cat &"') AND SalaryForWeb = < 13000 ORDER BY SalaryForWeb ASC"
It produces this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression '(Category='IT') AND SalaryForWeb = < 13000'.
/temp/outsearch2.asp, line 86
View Replies
View Related
I've got two variables:
currentPage = the current page number being viewed
nPages = the total number of pages
After navigating my site to the last page, these two numbers are the same, yet when I compare them with
if currentPage=nPages then
(execute true statement) else (execute false statement)
end if
the true statement never happens. I have printed the values of each variable just prior to the conditional and verified that they are the same. The only thing I can think of is maybe they are somehow different variable types or one has a decimal value I'm not seeing. Any ideas?
View Replies
View Related
I m using front page.I have used some button and value of all button is different so its width show different.I want to equal width of all buttons.I dont want to use link button.
View Replies
View Related
I need to make a text field equal to the entered value. Example: First time to the page nothing will show up in the field because nothing was entered. I enter a value and submit the form. The redirect is to the same page to add new inforation but this time the value entered in that one text field will be there. I tried <%=Request.Form("box")%as the value of the text field but to
no success.
View Replies
View Related
I m using front page. I have used some button and value of all
button is different so its width show different. I want to equal width
of all buttons. I dont want to use link button.
View Replies
View Related
I m using front page. I have used some button and value of all button is different so its width show different. I want to equal width of all buttons. I dont want to use link button.
View Replies
View Related
I m using front page. I have used some button and value of all button is different so its width show different. I want to equal width of all buttons. I dont want to use link button.
View Replies
View Related
I have a table having 3 columns. There is a checkbox for each line. I
need to get those lines whose checkboxes are checked, and show those
lines to another webpage. Is there any way to do that? My concern is
that all information in the table are in <tb></tb> pairs without any
name tag. Any idea?
View Replies
View Related
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
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
I'm doing a content management system, whereby the user can enter the HTML code for a currency symbol, eg £ for £.y . when I bring this data backup, say they want to edit the settings, then my ASP/HTML page is rendering the HTML code, eg £, rather than showing the original value, eg £.
If for example I put a space between the '&' and the 'pound;', eg & pound; then this will cause me problems because the user will think that they have to a put a space in or they file it with the space, which means the HTML code won't work any more. Is there a way round this?
View Replies
View Related
How do I convert an ASP variable to a Javascript variable?
View Replies
View Related
i need to include the html inside another html, though it might appear simple, the catch is this, my one html is in one server and my another html is in another server.I cannot read the html and stream it as it has images and their path gets changed when i do that.
More over i donot have any control over the html which i am going to include all i have is a url http:abcxx.htm whose content i want to show in another asp page. The technology is ASP (vbscript and javascript).
View Replies
View Related
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
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
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
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
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