Remove iframe from tab order? 
Author Message
 Remove iframe from tab order?

I have a form like this:

<form>
<input type=text>
<iframe></iframe>
</form>

Inside the <iframe> I have a <select>.

If I tab through the form, the text field gets highlighted, then the iframe,
then the select within the iframe.

I tried playing with tabindex, but it doesn't seem to have any effect.

Is there any trick to removing the iframe (but not its contained form
fields) from the tab order?  Or at least not making the outline of the
iframe highlight?

Initially I was surprised that the elements within the iframe followed the
logical tab order of the form in the parent document; that's very cool.  But
I don't like the {*filter*} outlining of the iframe; that's not very cool.

Thanks for any input...



Wed, 07 Jul 2004 13:21:14 GMT  
 Remove iframe from tab order?
I've got the same issue in an app I'm working on. The tab focus of the
IFRAME (dragger) is a real annoyance, but not one that I've approached yet -
though I stumbled across the idea of setting the TabIndex attribute to "-1",
which will eliminate the IFRAME as a tab stop. Check MSDN under "tabindex".

Haven't tried it yet. Lemme know if it works for you, would you?

Thanks!
S



Wed, 07 Jul 2004 14:40:11 GMT  
 Remove iframe from tab order?
Not sure if this is what you meant, but.....

I named the select in IFrame1 'selectOne'.  I trapped for onFocus at the
iframe and set focus on the select within the iframe.

<FORM name="frmOne">

<INPUT TYPE="text" NAME="txtOne">
<Iframe name="IFrame1" frameborder="0" scrolling="yes"
src="iframe1a.htm" width="250" height="250"
onFocus="IFrame1.selectOne.focus()">
</Iframe>
</FORM>

A crude example, but hopefully hopefull. (tested in IE6 only)

Best of luck,
AJ

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Thu, 08 Jul 2004 02:17:17 GMT  
 Remove iframe from tab order?
According to my understanding, set the iframe's tabindex to -1 will remove
it from the tab order.

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<INPUT type="text" id=text1 name=text1>
<iframe tabIndex=-1 src="http://www.microsoft.com"></iframe>
</BODY>
</HTML>

Hope it helps.

Regards,
Robin

This posting is provided AS IS, with no warranties, and confers no rights.



Sat, 10 Jul 2004 21:10:09 GMT  
 Remove iframe from tab order?
Unfortunately, tabindex=-1 also removes the tab stop from the select element
inside the iframe.  I'll have to go with an onfocus solution.

Thanks everyone
A


Quote:
> I've got the same issue in an app I'm working on. The tab focus of the
> IFRAME (dragger) is a real annoyance, but not one that I've approached
yet -
> though I stumbled across the idea of setting the TabIndex attribute to
"-1",
> which will eliminate the IFRAME as a tab stop. Check MSDN under
"tabindex".

> Haven't tried it yet. Lemme know if it works for you, would you?

> Thanks!
> S



Sat, 10 Jul 2004 21:42:56 GMT  
 Remove iframe from tab order?
Were you setting the tabIndex on the IFRAME or the BODY of the document that
the IFRAME loads. I had the same problem when I set tabIndex=-1 on the
<IFRAME>, but on the <BODY> the tabs stops worked for me.



Quote:
> Unfortunately, tabindex=-1 also removes the tab stop from the select
element
> inside the iframe.  I'll have to go with an onfocus solution.

> Thanks everyone
> A



> > I've got the same issue in an app I'm working on. The tab focus of the
> > IFRAME (dragger) is a real annoyance, but not one that I've approached
> yet -
> > though I stumbled across the idea of setting the TabIndex attribute to
> "-1",
> > which will eliminate the IFRAME as a tab stop. Check MSDN under
> "tabindex".

> > Haven't tried it yet. Lemme know if it works for you, would you?

> > Thanks!
> > S



Sun, 11 Jul 2004 02:43:21 GMT  
 Remove iframe from tab order?
Try trapping the onfocus event for the iframe. In the event handler, set
focus to the element in the document contained in the iframe. Something
like:
<form>
<input type=text>
<iframe onfocus="notcoolfocusingoniframe();"></iframe>
</form>

<script language=jscript>
function notcoolfocusingoniframe ()
{
    this.document.form.element.focus ();
//or if there's no form in the child document contained in the iframe
// this.document.all.element.focus();

Quote:
}

</script>

Cheers,

AW



Quote:
> I have a form like this:

> <form>
> <input type=text>
> <iframe></iframe>
> </form>

> Inside the <iframe> I have a <select>.

> If I tab through the form, the text field gets highlighted, then the
iframe,
> then the select within the iframe.

> I tried playing with tabindex, but it doesn't seem to have any effect.

> Is there any trick to removing the iframe (but not its contained form
> fields) from the tab order?  Or at least not making the outline of the
> iframe highlight?

> Initially I was surprised that the elements within the iframe followed the
> logical tab order of the form in the parent document; that's very cool.
But
> I don't like the {*filter*} outlining of the iframe; that's not very cool.

> Thanks for any input...



Mon, 12 Jul 2004 06:51:41 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Remove address bar from tab order???

2. Does Netscape support Tab Order/Index property?

3. Change Tab Order

4. tab order again

5. tab order

6. why are tabs removed from site text ?

7. Removing frames from the tab index

8. dictionary objects: key in order = sequential out order?

9. Post a form from one IFrame to another IFrame

10. IFRAME content hangs around on refresh but script in IFRAME is not available

11. Copy the content of and Iframe to anothe iframe

12. IFrame within an IFrame (JSRS)

 

 
Powered by phpBB® Forum Software