Should I Use Count To See If Button Was Pressed?
So far I've been using instructions like 'if request.form("var.x") <>
"" then ...' but then I found that if images are disabled (or not
found) and I click on the alt text, then Firefox (or was it IE?) sends
a 'var.x=' in the response so my instruction doesn't detect that the
'button' was pressed. Is it safe to change my checks to 'if
request.form("var.x").count 0 then ...' instead? does it work for
all browser responses and HTML standards, etc?
View Replies
ADVERTISEMENT
Looked everywhere and have so far got no further than an hour ago.
I want to alert the user when they have pressed the close button on the window so that they have the option of not closing. I know it sounds mad but its essential for me.
View Replies
View Related
Is there a way in ASP to prevent users from accessing a web page when the back button is pressed in the browser.
View Replies
View Related
anyone ever noticed that if you're in a select box on a form and you push the backspace key, it takes you back a page in your history?
It even did it on this posting page, when I clicked in the font drop down.Any idea how to prevent this?
View Replies
View Related
NOT SURE It's an MTS matter or just IIS , and if not, do tell me what is the software to use for it,a dn where to ask.
I'd like to get a daily/weekly/monthly report regarding number of links that r pressed from my site.
Details:
1. I have 4 pages, and each page has a list of links. I'd like to get statistics reports regarding usage of these links. I.e. - I'd like to know how many times each link is pressed (pre day, week, month) by users.
2. I would also like to know what hour/day/date each pressing took place, and also the IP number of the user.
3. I would also like to know if possible to get the info as a table that can be edited later (if copied to excel etc.), and get Graphs also.
We r using IIS (Intranet), OS IS windows NT, and DB is Microsoft Access. I'd like the administrator to perform such reports on a daily basis (and weekly and monthly as well), and send it to us (the asp programmers).
I have no access to the live server (besdies copying files to there), so can not use the IIS/MTS myself.
View Replies
View Related
I want to understand the difference between submit button and regular button: <input type="submit"> and <input type="button">. My understanding is that submit button will send the entire HTML form to the web server, but regular button won't.
I have a problem that needs to pass HTML elements data back and forth in several ASP pages. I am using regular button to do that. But what's the approaches?
View Replies
View Related
I have a column n_fog defined as text. In this i have numbers or blank value in it.
For example i have 5 records
Record - number
1 - 2
2 - 2
3 - ''
4 - 3
5 - ''
What i want to know is get the total of the numbers. So it should give me 2+2+3 = 7
How can i do it?
View Replies
View Related
I have a link like this
<a href="/mainfolder/one.pdf"> view pdf
what i want to do is find out how many times the pdf was open
so a member logs on the website goes into member section on that page he sees a pdf i want to find out how many times did he click on the link and opened the pdf
i have a field in the table that will store the count value.
View Replies
View Related
For example take below as my array
myArray[0] = Bill
myArray[1] = Ben
myArray[2] = Ben
myArray[3] = Bill
myArray[4] = Ria
myArray[5] = John
myArray[6] = Gemma
myArray[7] = Gemma
myArray[8] = Bill
I want to be able to count the above and produce a list like so
Bill = 3
Ben = 2
Ria = 1
John = 1
Gemma = 2
View Replies
View Related
I have a problem with the below which I can't understand..
SQLcount ="SELECT COUNT(dates) AS total FROM dates"
Con.execute(SQLcount)
Response.Write total
And it doesn't return anything..
When I ask Isnull(total) the answer is "False".
So, if it has a value, why doesn't return it?
View Replies
View Related
What I want to do is count records in a table. if that count result is an
even number do something, if it is an odd number, do something else. sortof
like this.
set row_count = conn.execute("select count(clan_name) as cnt1 from clans")
clan_cnt = row_count.fields.item("cnt1").value
now this is the part i need
if clan_cnt " is odd" then
do something
else
do something else
end if
can someone shed some light on this for me please?
any help would be great, if even steering me in the right direction of some
site. would love to figure this out on my own, but just need a shove.
View Replies
View Related
I'm selecting a wide range of records. Some of these records may have duplicates in one value but some may not. I want to display the records as one and have a seperate display that counts how many there are WHERE the field is equal to a certain value. Code:
View Replies
View Related
I have to do this client side as well as server side
i have a field where a user can enter alpha numberic values
i want to count the integers or numbers seperately
can someone tell me how to do it
for example a user enters a3re4567
so there are 34567
so there are 5 integer or 5 numbers in that field
so i want to pop up an alert on client side.
View Replies
View Related
I m trying to use "select count" in order to retrieve the total number of a value in the database using the code below, but it doesn t seem to work. I get the following error mesage:
Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
i checked all the fields in the table, but i dont know if the syntax is wrong.
the code starts here--->
set rsTypes = con.execute("SELECT COUNT (cat) AS Total FROM firstmarch")
View Replies
View Related
i am trying to pull a count from the top 16 records in a db.
select count(top 16 (username)) as cnt2 from bracketdb_"&tourney_id&" where
username <'BYE' order by POS
this is what i need to do, however, it doesn't work. i am getting a systax
error near TOP.this is using SQLdb
View Replies
View Related
I have a Access database with two tables; a category table and an images table.In the Category table I have a field for Index number and a field for Categories. The images table has a field for all the images and a field to specify what category the images are assigned to.
I am trying to write a simple Select query that will return a list of Categories from my Category table, and in the second colum a count of the number of images assigned to each category from my main table of images.
View Replies
View Related
I'm using SQL/VBScript and need to get the number of records found in a DB search. I'm using. where I need it, but in this case, how would I access the info?
Code:
"SELECT COUNT(*) FROM Locations WHERE Location = 'Paris SBDC'"
How do I access the results? I'm really new to SQL and ASP, and the way I usually query a database is
Code:
set rs=objRecordset.Execute(sql)
and plug in
Code:
variable = <%rs.fields("fieldname")%>
View Replies
View Related
I'm having a little trouble trying to fix a little problem of mine. I have an SQL statement which counts all of the records of a certain type. Its fine up to here.
What I want to do is do a Count on a field where the value is > 0 and then do this for several fields in one SQL statement. how I may do it?
View Replies
View Related
how can i create a number that goes up by one everytime its goes throgh a loop. would it be like this:
dim numbercounter
numbercounter = 1
do while numbercount eof
numbercount +1
View Replies
View Related
How do i Count Records with "the same values"?
Name, Age, Sex
John, 20, M
Barry, 24, M
Eve, 19, F
How do i Count the Males and Females?
Like "There is currently 2 M and 1 F registered"
To count them all I would just use rsTable.RecordCount, but dont know how to Count them the way i want them to.
View Replies
View Related
Course_Info and Students. Course_Info holds all the information for each course that a student can sign up for. The Students table holds all of the student’s information. The field that ties the two tables together is Course_Name.
I have an admin page that I would like to display the total number of students enrolled for each class. How can I count the records in the Students table, and then display the total number of students that are enrolled in each individual classes?
View Replies
View Related
Is is possible to accurately count the number of characters in a Word document using ASP?
View Replies
View Related
I am trying to work out how I can count my arrays to compare the number of values.
Code:
ArrID=Split(Request.Form("ID" ),"," )
ArrData=Split(Request.Form("Data" ),"," )
if count(ArrID) = count(ArrData) then
Do Stuff
else
Assign Failure Value
View Replies
View Related
I'm trying to output some data from the db into a table but I'm getting a number of problems with the layout if all the words are together. The table stretches across the screen. I want to be able to output a number of words/characters and then insert a line break and then carry on with the rest of the output.
View Replies
View Related
I got a problem with my printer friendly page. The problem is the total character has overflow the max character per line (no 66 in my print screen) and this affect my page counter no. Is there a way for me to fix it like a function to check the total no of pixel? Code:
View Replies
View Related
I have tried everything possible and still I cant understand why one of the codes work.
This one works, uses a Form to get required info. Code:
View Replies
View Related
I want to add an include line to my main page to veiw how many sites is in my database..
This what I came up with for example:
<!--#INCLUDE FILE="DBCONNECTION.ASP"-->
<%
DIM SQL,RS
SQL = "SELECT COUNT(URL) FROM TABLE1"
SET RS = SERVER.CREATEOBJECT("ADODB.RECORDSET")
RS.OPEN SQL, CONN, 3, 3
%>
How can i show the number only in my main page...
View Replies
View Related
Essentially all I'm trying to do is add numbers together. If there isn't a record then create one with the number 001.
If there is a record add one to the number (Which in most cases will be 001) so the next number should be 002.
My problem is that it gets to 002 and stops. Any ideas why? Code:
View Replies
View Related
I would like to create a count on each page (I am making a global include), and I want to display the number of users on that page. Also, I would like to show the most poular pages. I would like to do this without a database, prefereably using Application objects (or if their not objects...what ever thay are). I know that this may be difficult, but does any one know how I could accomplish this?
View Replies
View Related
Here is my SQL code in my asp page that calls the number od downloads made from tbldownload, but I want to get specfic with the number of downloads by user from tbluser
Download count sql
Set rsDownloadAdmin = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT downloadid, downloadtitle, downloadcount FROM tbldownload ORDER BY DownloadID"
rsDownloadAdmin.Open strSQL, adoCon
This works fine , I just want to add the statment and syntax that will show downloads by spefic user or user id
View Replies
View Related
I am trying to get the total no. of students that have signed for each course. I am getting "0" in all the totals for all courses. What could be the problem? Here is my code:
View Replies
View Related
I have a database with three fields, id, code, and feedback code is a reference so there are many occurances of the same code, and feedback will be either 0,1,2 =, or 3
I am trying to count the feedback scores to display them like this
Code 0 1 2 3
123 10 12 6 20
321 2 6 10 30
etc
I think it can be done using count() but can't quite work it out.
I have got part way using ,
SELECT code, Feedback, Count(id) as myid FROM tblfeedback GROUP BY code, Feedback ORDER BY code Feedback
but this displays it like,
code feedback total
123 0 10
1 12
2 6
3 20
Any ideas what my SQL should look like.
View Replies
View Related
I need to set a variable to a select count(*) so I can check if something exists.
For example I have:
SQL = Select field from table where a = adf and b = fdad
set rs = conn.execute(sql)
variablec = rs("c")
But I want to do it with a count so i can use:
If variablecount > 1 Then
newvariable = true
down the line.
View Replies
View Related