Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Javascript eqiiv of vfp keyboard commands
Message
 
 
À
26/08/2002 16:37:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00693784
Message ID:
00693845
Vues:
21
Neil,
You can access the Value of the TextArea and change it from the OnClick of the button. If you need to prepend stuff, use concatenate "New Stuff" and .Value; otherwise, concatenate .Value and "New Stuff". I don't know if the cursor will be in the correct place but you can test that. And as you posted, you can use the Focus() method to make the TextArea active.

And rememebr to "return false;" if the button is a submit button; otherwise, the form will be submitted immediately after the value changes.

>You are correct. I did not think about it in that way. What I am attempting to do is this. I have an textarea that my user types into. I would like the user to be able to click on a button that would either set the cursor at the end or the beginning of the textarea. I really don't need the keyboard commands to do that do I? Can't I use something like a selstart property or something like that and code the new value of the property. Then I could focus() back to the textarea?
>
>Neil
>
>
>Neil,
>>You don't. JavaScript is supposed to be innocuous and even a bad "hacker" can do alot with the ability to access keyboard input.
>>
>>AFAIK, the only way would be to access the Windows Scripting Host (if installed) and use the WshShell object. It has a SendKeys method that will send keystrokes to the active window. For obvious reasons, this could be disallowed by the admin types.
>>
>>Good luck!
>>
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform