|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Sending tab characters
I am trying to put together some javascript that will send two tab characters after a document loads. I am looking to do something like
<body onLoad="PressTab;PressTab;"> Thanks for any help. |
|
#2
|
||||
|
||||
|
tabs
The only way that I have found to pass tabs is to put the hex inside pre tags (minimalist version)
<html> <body> <pre>this for that</pre> </body></html> |
|
#3
|
||||
|
||||
|
The question is not how, but why. And when that question arises, the answer is probably "can't be done" since it's a security risk. No browser should allow you to send characters as if from a user's keyboard. What is to stop you from creating a complex sequence that grabs one of his passwords, puts it in a form and emails it to you?
Now, I assume you want to do this to put the focus on a certain element in a form, in which case you're probably way better of by putting a focus() command in the onload attribute: Code:
<body onload="document.forms[0].elementname.focus()">
__________________
This is my code. Is it not nifty? "The biggest problem encountered while trying to design a system that was completely foolproof, was, that people tended to underestimate the ingenuity of complete fools." ---Douglas Adams Join the Itsacon fanclub! Zero Tolerance: Spammers banned so far: 264
![]() |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Sending tab characters |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|