Link to home
Start Free TrialLog in
Avatar of mnprsd
mnprsd

asked on

Activate 'overwrite'-mode with JScript

Does anybody know a way to activate/deactivate the overwritemode (insert-key toggle) within a textbox, with JScript in IE.

Avatar of Deathead
Deathead

Unfortunatly this is impossible in JavaScript, The creators feel it would be a security risk. Sorry
Avatar of mnprsd

ASKER

Sad! Here is my problem. I have a textbox with initially five hyphens in it ("-----"). Each of these hyphens represents a flag. The value can be any number from 0 to 9, or -. For example "--1-2".

The users will often change these values and therefore I wanted to initially set the the textbox in overwrite-mode.

If anyone have any great workaround for this problem I'd be happy to know.
Avatar of Michel Plungjan
How about 5 dropdowns???
<select name=s1>
<option value="-">-
<option value=0>0
<option value=1>1
<option value=2>2
<option value=3>3
<option value=4>4
<option value=5>5
<option value=6>6
<option value=7>7
<option value=8>8
<option value=9>9
</select><select name=s2>
<option value="-">-
<option value=0>0
<option value=1>1
<option value=2>2
<option value=3>3
<option value=4>4
<option value=5>5
<option value=6>6
<option value=7>7
<option value=8>8
<option value=9>9
</select><select name=s3>
<option value="-">-
<option value=0>0
<option value=1>1
<option value=2>2
<option value=3>3
<option value=4>4
<option value=5>5
<option value=6>6
<option value=7>7
<option value=8>8
<option value=9>9
</select><select name=s4>
<option value="-">-
<option value=0>0
<option value=1>1
<option value=2>2
<option value=3>3
<option value=4>4
<option value=5>5
<option value=6>6
<option value=7>7
<option value=8>8
<option value=9>9
</select><select name=s5>
<option value="-">-
<option value=0>0
<option value=1>1
<option value=2>2
<option value=3>3
<option value=4>4
<option value=5>5
<option value=6>6
<option value=7>7
<option value=8>8
<option value=9>9
</select>

Michel
Avatar of mnprsd

ASKER

Unfortunately, this textbox isn't the only one. There are four of these textboxes per row, and there can be multiple rows, sometimes over a hundred. Sorry, but I forgot to mention that.
Does make a difference!

Michel
ASKER CERTIFIED SOLUTION
Avatar of DanRollins
DanRollins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mnprsd

ASKER

This solution actually works!! Maybe not as pretty as I had hoped it could be, but still working and the user shouldn't notice any lack in functionality! I will also add a feature that sets focus to the next <textarea> whenever a valid key is pressed. Thanks man!