473,756 Members | 7,611 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Please help me with this, simple idea

Hello, I want a function that when it detects the left mouse button is
pressed down, will generate and cycle 5 random number/letter
combinations as fast as it can in a printed space. If I let off the
mouse button then it should stop, and it can re-start again when
pressed, etc..... can someone help help? :-)

May 8 '07 #1
14 1457
he*********@gma il.com said the following on 5/8/2007 8:37 AM:
Hello, I want a function that when it detects the left mouse button is
pressed down, will generate and cycle 5 random number/letter
combinations as fast as it can in a printed space. If I let off the
mouse button then it should stop, and it can re-start again when
pressed, etc..... can someone help help? :-)
Sure, someone can help. Post your code that you have written so far.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 8 '07 #2
Lol, thanks for throwing cold water over my theory... I have heard
rumors about you! Please don't post to this thread or it will be
considered harassment and treated as such.

May 8 '07 #3
wrote on 08 mei 2007 in comp.lang.javas cript:
Lol, thanks for throwing cold water over my theory... I have heard
rumors about you! Please don't post to this thread or it will be
considered harassment and treated as such.
It is not clear what and who you mean.

[please always quote on usenet]

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
May 8 '07 #4
It is not clear what and who you mean.
What is unclear Evertjan the reply pertaining to Randy Webb?? I don't
assume you mean the original post is unclear. What is your cause now?

May 8 '07 #5
wrote on 08 mei 2007 in comp.lang.javas cript:
>It is not clear what and who you mean.

What is unclear Evertjan the reply pertaining to Randy Webb?? I don't
assume you mean the original post is unclear. What is your cause now?
You did not quote, so how are we to know that your "reply pertained to
Randy Webb", if you do not, as required by netiquette, quote.

Please follow usenet netiquette on usenet.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
May 8 '07 #6
Please follow usenet netiquette on usenet.

Please follow basic human etiquette. Sorry for you not having a keen
grasp of the obvious in the ridiculously short 2 message thread you
could not make associated connections to. I think you just wanted to
pitch a knife-fight vs. your honest claim you could not make heads or
tails of it? Sure. Please do not post here either unless you want to
help. Unless I am wrong, Ok?

-Cindy

May 8 '07 #7
ASM
he*********@gma il.com a écrit :
>Please follow usenet netiquette on usenet.

Please follow basic human etiquette.
Human is not a computer, he could be lost in all those post ...
and netiket is a good practice to follow for his convenience.
Please do not post here either unless you want to
help. Unless I am wrong, Ok?
If you want an help, give first what exactly you want to do, and how you
try to do it.

For the moment and since 3 or 4 posts you're wrong and only blow wind.

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
May 8 '07 #8
You can detect the mouse button state with
<body onmousedown="go ()" onmouseup="stop ()">
.... see http://www.w3schools.com/jsref/jsref_events.asp

But what does "in a printed space" mean? Is it a textbox object, or some
HTML text on the webpage?

he*********@gma il.com wrote:
Hello, I want a function that when it detects the left mouse button is
pressed down, will generate and cycle 5 random number/letter
combinations as fast as it can in a printed space. If I let off the
mouse button then it should stop, and it can re-start again when
pressed, etc..... can someone help help? :-)
May 8 '07 #9
On May 8, 3:02 pm, helpfulm...@gma il.com wrote:
Please follow usenet netiquette on usenet.

Please follow basic human etiquette. Sorry for you not having a keen
grasp of the obvious in the ridiculously short 2 message thread you
could not make associated connections to. I think you just wanted to
pitch a knife-fight vs. your honest claim you could not make heads or
tails of it? Sure. Please do not post here either unless you want to
help. Unless I am wrong, Ok?

-Cindy
this function from phpmyadmin
so you shouldnt use it verbatim unless you then GPL you source code.

/**
* Generate a new password, which may then be copied to the form
* with suggestPassword Copy().
*
* @param string the form name
*
* @return boolean always true
*/
function suggestPassword () {
var pwchars =
"abcdefhjmnpqrs tuvwxyz23456789 ABCDEFGHJKLMNPQ RSTUVWYXZ.,:";
var passwordlength = 16; // do we want that to be dynamic? no,
keep it simple :)
var passwd = document.getEle mentById('gener ated_pw');
passwd.value = '';

for ( i = 0; i < passwordlength; i++ ) {
passwd.value += pwchars.charAt( Math.floor( Math.random() *
pwchars.length ) )
}
return passwd.value;
}
you need markup like so
<input id="button_gene rate_password" value="Generate "
onclick="sugges tPassword()" type="button">
<input name="generated _pw" id="generated_p w" type="text">

now all you need is
*set the number of digits to 5 as required
*an onmousedown instead of onclick to call the function
*a way of using setInterval with a certain number of milliseconds to
repeat the triggering of the suggestPassword function
*an onmouseup event, which cancels this.
May 8 '07 #10

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

Similar topics

1
11045
by: Dan | last post by:
Hello, I am trying to read and write to an Excel file via my Java applet. I have done so successfully on several simple Excel files that simply had data cells without many complicated equations or any other Excel extras. However, now is the time to get the complicated ones to work. I didn't think that there would be a difference, but there is. At first, I was beginning to think that it was a file size problem, but now I am unsure. ...
72
4402
by: Raymond Hettinger | last post by:
Peter Norvig's creative thinking triggered renewed interest in PEP 289. That led to a number of contributors helping to re-work the pep details into a form that has been well received on the python-dev list: http://www.python.org/peps/pep-0289.html In brief, the PEP proposes a list comprehension style syntax for creating fast, memory efficient generator expressions on the fly: sum(x*x for x in roots)
1
1973
by: Johnny | last post by:
Hi together, I'm new to XML and have problems with FOP (http://www.apache.org/dyn/closer.cgi/xml/fop) When I try to convert my .fo document to .pdf, I get this message: fo:39:26 master-reference '' for fo:page-sequence matches no simple-page-master or page-sequence-master
15
5881
by: Anton Gavrilov | last post by:
Hi all, I seek your advice on where to start if I want to write a compiler for a toy C-like language I invented (or, rather, am in the process of inventing). Yes, yes, I know I'm crazy and the very idea is brain-damaged and all that. Chances are I will lose interest long before I reach break-even, but it doesn't hurt trying, does it? I'm a C addict reluctant to switch to C++, partly because I can't fully grok (and accept) the OOP...
59
5016
by: Alan Silver | last post by:
Hello, This is NOT a troll, it's a genuine question. Please read right through to see why. I have been using Vusual Basic and Classic ASP for some years, and have now started looking at ASP.NET. At first glance, it looks excellent, albeit nothing that couldn't have been done to Classic ASP. I have been through a few tutorials and was impressed with how quickly you can get database info onto a page.
1
9650
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej and I was wondering if anyone here would be able to give me some tips for young players such as myself, for learning the language. Is this the best Newsgroup for support with JAVA?
8
1701
by: | last post by:
I'm looking for some design guidance on a collection of projects I'm working on. The project involves a bunch of websites constructed out of a collection of user controls. Different user populations with different access rights and "roles" will be visiting the site. I will be using ASP.NET 2.0's membership, roles, and profiles stuff to manage access. User controls need to be visible or not visible depending on user role. In some...
21
1802
by: Galen Somerville | last post by:
My application receives and displays Heart sounds and ECG's in real time. This data comes from a proprietary USB 2.0 device. Unlike most USB devices, this data comes in short bursts of about 24 bytes. These bursts could come as fast as every millisecond. The display of the sound and ECG traces is similar to an oscilloscope display except a blank space of about 5 pixels is shown as it sweeps across the screen. This means that not only is...
112
4750
by: Prisoner at War | last post by:
Friends, your opinions and advice, please: I have a very simple JavaScript image-swap which works on my end but when uploaded to my host at http://buildit.sitesell.com/sunnyside.html does not work. To rule out all possible factors, I made up a dummy page for an index.html to upload, along the lines of <html><head><title></title></ head><body></body></html>.; the image-swap itself is your basic <img src="blah.png"...
0
9384
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9212
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
9973
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9645
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
8645
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
5069
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...
1
3742
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3276
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2612
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.