473,769 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Increment Counter

An ASP page has a variable named iCounter whose initial value is 0.
This ASP page has a drop-down list. When an option is selected from the
drop-down list, I want the value of the iCounter variable to increment
by 1. For e.g. when an option is first selcted, iCounter should be
equal to 1. When an option is selected again, iCounter should be equal
to 2 so on & so forth. How do I do this?

Thanks,

Arpan

Sep 15 '05 #1
1 1876
this is clientside....u nless you want the page to postback to the server on
every click? You'll have to add an onclick event to it and tie it to a
javascript function to increment a value.
Followup in a clientside/javascript group possibly, if you need more
specifics.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Arpan" wrote:
An ASP page has a variable named iCounter whose initial value is 0.
This ASP page has a drop-down list. When an option is selected from the
drop-down list, I want the value of the iCounter variable to increment
by 1. For e.g. when an option is first selcted, iCounter should be
equal to 1. When an option is selected again, iCounter should be equal
to 2 so on & so forth. How do I do this?

Thanks,

Arpan

Sep 15 '05 #2

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

Similar topics

1
3776
by: Tim Hussein | last post by:
Hi, this is my situation: I have a counter on my MAIN page. It is incremented by requesting a certain "picture" which is the output of a script. I can do this manually with: http://www.mydomain.com/script.php?id=123456&vid=987654 This increments the counter.
11
2792
by: csomberg | last post by:
SQL 2000 I thought I would throw this out there for some feedback from others. I'd like to know if you feel using MS auto-increment field is a good solution these days or should one grow their own ? Thanks, Me.
98
14459
by: jrefactors | last post by:
I heard people saying prefix increment is faster than postfix incerement, but I don't know what's the difference. They both are i = i+1. i++ ++i Please advise. thanks!!
0
1743
by: Jason Smith | last post by:
Here is a something I used recently to increment job numbers for a company. Create counter table with one integer filed (i.e. tblCounter). Create a single record with the starting value (in you case 001). Then, all you have to do is use the Dmax function to grab the last value and after that value is used, apply code to insert a record creating the next available number. Here is the code: Private Sub Combo23_AfterUpdate() Dim...
8
6330
by: Mantorok Redgormor | last post by:
The only adder I was able to come up with for incrementing by one, uses a for loop. I was trying to do this without using a for loop while emulating i++(it's for obfuscated code) Anyone know of a way to increment by one continuously, while updating the same value stored in an object, without the need of such a loop? basically a one-liner.
13
6381
by: kailasam | last post by:
Hello, Iam having a doubt. Which is more efficient post increment or Pre increment? I have read that preincrement is efficient than Post increment. Iam not able to think how it is? For an independent statement i++ and ++i which is more efficient? Regards Kailasam
2
2392
by: Gheorghe Postelnicu | last post by:
Hi, I have a situation of the following type: for line in lineList: for item in line.split() myArray itemCounter = itemCounter + 1 counter = counter +1
13
9842
by: technocraze | last post by:
Hi guys, I have an issue with incrementing a counter in a table using VB in MS Acess environment. Below mentioned is an instance. Implementation logic Table fields Serialno = pk Datatype text StudentId Text Course Text
12
28458
by: badvoc | last post by:
Hi, I have had some good fortune on this site so I am back and I must iterate I am a beginer. I am having some problems getting to grips with the right technique to manage variables and adding a unique order number to a customer order form. I have 4 stages to my order form. Stage 1 involves the user selecting a link based on what they want. The link then sets 2 variables. $type and $fault based on the link they have chosen.
0
9422
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10038
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9987
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9857
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8867
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5294
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3558
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.