Hello,
I am having problems using NETSCAPE with the tabindexes after using the "onBlur" Javascript function. I have been looking and looking and I can't find what is wrong!!!.
Basically, I have the following:
- field1
- field2
- field3
- field4
...etc
Field 2 and field3 are inicially disabled.
What I want to do is:
- If I enter something in field1 => I want field2 and field3 to be automatically enabled.. and obviously I want the cursor to be on field2. Sounds easy right?
Now:
CASE 1: Field 1 is empty:
- I use the "tabulator" from field1.... and the cursor goes to field4: CORRECT.
CASE 2: Field1 is not empty:
- I use the "tabulator".... field3 and field4 are enabled .... but the cursor goes to field4!!!!!
It works perfectly with Explorer but not with Netscape 7.0
Could you help ?
Here is part of my coding:
....
Function initForm1(form)
{
var f1=form.field1.value;
if (!f1.match(/^(\s)*$/) )
{
form.field2.disabled=false;
form.field3.disabled=false;
form.field2.focus();
}
else
{
form.field2.disabled=true;
form.field2.value="";
form.field3.disabled=true;
form.field3.value="";
}
}
.....
Field1:
<input type=text name="field1" tabindex=3 onBlur="initForm1(this.form);"
<br>
Field2:
<input type=text name="field2" tabindex=4>
<br>
Field3:
<input type=text name="field3" tabindex=5>
<br>
Field4:
<input type=text name="field4" tabindex=6>
.....
I am having problems using NETSCAPE with the tabindexes after using the "onBlur" Javascript function. I have been looking and looking and I can't find what is wrong!!!.
Basically, I have the following:
- field1
- field2
- field3
- field4
...etc
Field 2 and field3 are inicially disabled.
What I want to do is:
- If I enter something in field1 => I want field2 and field3 to be automatically enabled.. and obviously I want the cursor to be on field2. Sounds easy right?
Now:
CASE 1: Field 1 is empty:
- I use the "tabulator" from field1.... and the cursor goes to field4: CORRECT.
CASE 2: Field1 is not empty:
- I use the "tabulator".... field3 and field4 are enabled .... but the cursor goes to field4!!!!!
It works perfectly with Explorer but not with Netscape 7.0
Could you help ?
Here is part of my coding:
....
Function initForm1(form)
{
var f1=form.field1.value;
if (!f1.match(/^(\s)*$/) )
{
form.field2.disabled=false;
form.field3.disabled=false;
form.field2.focus();
}
else
{
form.field2.disabled=true;
form.field2.value="";
form.field3.disabled=true;
form.field3.value="";
}
}
.....
Field1:
<input type=text name="field1" tabindex=3 onBlur="initForm1(this.form);"
<br>
Field2:
<input type=text name="field2" tabindex=4>
<br>
Field3:
<input type=text name="field3" tabindex=5>
<br>
Field4:
<input type=text name="field4" tabindex=6>
.....