473,387 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Event Counter in JavaScript

Hello,
hopefully somebody can help me.

In my homepage I would like to install a picture gallery (small pictures).

If the user places the mouse over a picture, by using the event handler MouseOver in JavaScript, the picture is resized.

In order to generate a kind of hit list for the pictures (which picture is most interesting) , I would like to count up all MouseOver Events related to the pictures respectively.

Is it possible to generate a counter for this?
Do anybody has an idea for the problem?

Thank you in advance.

Sincerely

Ernst Lindner
Apr 26 '06 #1
1 2448
acoder
16,027 Expert Mod 8TB
Most probably you'd want a counter for all visitors, not just a local count.

For this, you can make an Ajax request to update the count on the server. However, with multiple mouse over events, this may cause problems. To solve this, keep an array of integers which stores the number of mouse events for each picture, then make one request every minute or so to update the counters.
Apr 24 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Michelle | last post by:
I have tried every variation of the "onchange" statement below without any actual reloading of the page. I am hoping that the PHP PRINT statement is constructed wrong, otherwise it is javaScript...
8
by: Jim in Arizona | last post by:
I've been looking for a counting script to count the number of hits to my HTM and asp web pages on my company's internal website. So far, everything I've seen only works on asp pages. Where would I...
6
by: amith | last post by:
hi, i have some 10 radio buttons meant to take the rating from the user. ex: 1 2 3 4 5 6 7 8 9 10 looks O O O O O O O O O O 1 2 3 4 5 6 7 8 9 10 features O O O O O O O O O O
2
by: Carl Gilbert | last post by:
Hi I am looking to generate a counter based on the following event. The event is generated every time a new image is recieved and this is what I need to count. <SCRIPT LANGUAGE="JavaScript"...
4
by: Jack | last post by:
I have a script in which a function launched by a START button continuously calculates and writes a value to a text box. The calculation is done in a for loop. In the loop is a conditional that is...
1
by: sfeher | last post by:
Hi All, I need to synchronize on multiple event notifications. After loading a number of scripts in my page ( using document.createElement('script') / appendChild ) I get a notification for...
4
by: srinpraveen | last post by:
I badly want to know if there is a way in javascript to just a create a variable and increment it each time a particular visits the page. In other words, I want to use this as a counter for counting...
6
by: caine | last post by:
I have a clickable calendar, which user can select the day that they want to view the news linking to. My calendar has the clickable event day, but once the user click it, the day selected could...
0
by: MaryamSh | last post by:
Create Dynamic Dropdownlist Controls and related event -------------------------------------------------------------------------------- Hi, I am creating a Dynamic Search in my application. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...

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.