|
 |
asp_web_howto thread: move to field in iframe by tab
Message #1 by "Olga" <olgat@c...> on Thu, 30 May 2002 06:56:45
|
|
Hi everyone,
I have iframe in my page ( it contains one listbox). I need to be able to
move from the last field on the page to the listbox on the iframe by
regular TAB ( I don't want the user to know that this is different
frame). I used onKeyDown event for this purpose - if TAB was pressed set
focus on the listbox , but it doesn't work well. Instead of seting focus
on the listbox it setting focus on the whole frame
Here is the code :
function clickHandler(e)
{
var key=window.event.keyCode
if (key==9){
myiframe.document.forms[0].mylistbox.focus()
}
}
'this is my last fielad on the page
<input type=checkbox name=n_display onKeyDown=clickHandler(event)>
Does anyone knows what is the problem here and how I can fix it ?
Thanks
Message #2 by Oleg Kapeljushnik <c-oleg.kapeljushnik@w...> on Thu, 30 May 2002 08:43:43 -0400
|
|
if you using IE it better way to reffer to IFRAME using this syntax.
document.frames['myiframe'].document.forms[0].mylistbox.focus();
Hope this will help.
Oleg.
-----Original Message-----
From: Olga [mailto:olgat@c...]
Sent: May 30, 2002 2:57 AM
To: ASP Web HowTo
Subject: [asp_web_howto] move to field in iframe by tab
Hi everyone,
I have iframe in my page ( it contains one listbox). I need to be able to
move from the last field on the page to the listbox on the iframe by
regular TAB ( I don't want the user to know that this is different
frame). I used onKeyDown event for this purpose - if TAB was pressed set
focus on the listbox , but it doesn't work well. Instead of seting focus
on the listbox it setting focus on the whole frame
Here is the code :
function clickHandler(e)
{
var key=window.event.keyCode
if (key==9){
myiframe.document.forms[0].mylistbox.focus()
}
}
'this is my last fielad on the page
<input type=checkbox name=n_display onKeyDown=clickHandler(event)>
Does anyone knows what is the problem here and how I can fix it ?
Thanks
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
Message #3 by olgat@c... on Thu, 30 May 2002 17:31:24 +0200
|
|
I still have this problem, but thanks anyway .. I found another way to
handle the Tab problem, but I still has Shift+Tab problem - I just don't
know how to catch it !! .
Maybe you have some idea how I can know that Shift+Tab key was pressed ?
-----Original Message-----
From: Oleg Kapeljushnik [mailto:c-oleg.kapeljushnik@w...]
Sent: Thursday, May 30, 2002 2:44 PM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: move to field in iframe by tab
if you using IE it better way to reffer to IFRAME using this syntax.
document.frames['myiframe'].document.forms[0].mylistbox.focus();
Hope this will help.
Oleg.
-----Original Message-----
From: Olga [mailto:olgat@c...]
Sent: May 30, 2002 2:57 AM
To: ASP Web HowTo
Subject: [asp_web_howto] move to field in iframe by tab
Hi everyone,
I have iframe in my page ( it contains one listbox). I need to be able to
move from the last field on the page to the listbox on the iframe by
regular TAB ( I don't want the user to know that this is different
frame). I used onKeyDown event for this purpose - if TAB was pressed set
focus on the listbox , but it doesn't work well. Instead of seting focus
on the listbox it setting focus on the whole frame
Here is the code :
function clickHandler(e)
{
var key=window.event.keyCode
if (key==9){
myiframe.document.forms[0].mylistbox.focus()
}
}
'this is my last fielad on the page
<input type=checkbox name=n_display onKeyDown=clickHandler(event)>
Does anyone knows what is the problem here and how I can fix it ?
Thanks
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
Message #4 by Oleg Kapeljushnik <c-oleg.kapeljushnik@w...> on Thu, 30 May 2002 10:56:09 -0400
|
|
yes,
try:
var bShiftPressed = event.shiftKey;
you also can catch if it was left or right.
var bLeftShiftPressed = event.shiftLeft;
var bLeftRightPressed = event.shiftKey && (!event.shiftLeft);
Oleg.
-----Original Message-----
From: olgat@c... [mailto:olgat@c...]
Sent: May 30, 2002 11:31 AM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: move to field in iframe by tab
I still have this problem, but thanks anyway .. I found another way to
handle the Tab problem, but I still has Shift+Tab problem - I just don't
know how to catch it !! .
Maybe you have some idea how I can know that Shift+Tab key was pressed ?
-----Original Message-----
From: Oleg Kapeljushnik [mailto:c-oleg.kapeljushnik@w...]
Sent: Thursday, May 30, 2002 2:44 PM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: move to field in iframe by tab
if you using IE it better way to reffer to IFRAME using this syntax.
document.frames['myiframe'].document.forms[0].mylistbox.focus();
Hope this will help.
Oleg.
-----Original Message-----
From: Olga [mailto:olgat@c...]
Sent: May 30, 2002 2:57 AM
To: ASP Web HowTo
Subject: [asp_web_howto] move to field in iframe by tab
Hi everyone,
I have iframe in my page ( it contains one listbox). I need to be able to
move from the last field on the page to the listbox on the iframe by
regular TAB ( I don't want the user to know that this is different
frame). I used onKeyDown event for this purpose - if TAB was pressed set
focus on the listbox , but it doesn't work well. Instead of seting focus
on the listbox it setting focus on the whole frame
Here is the code :
function clickHandler(e)
{
var key=window.event.keyCode
if (key==9){
myiframe.document.forms[0].mylistbox.focus()
}
}
'this is my last fielad on the page
<input type=checkbox name=n_display onKeyDown=clickHandler(event)>
Does anyone knows what is the problem here and how I can fix it ?
Thanks
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
|
|
 |