Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Focus on a hidden form object

Status
Not open for further replies.
hmmm why do you want to do that? IE gave me this error when I tried (with input type=hidden):

"Cannot move focus to control because it is invisible, not enabled, or of a type that does not accept the focus." jaredn@subdimension.com -
 
I got the same error. Maybe I'm going about it the wrong way. Here is what I want to do:

I have an object on an html page (most likely a <div> or <table>) that I want to be visible for 8 seconds after which it disappears. The way I have it set up now is that after 8 seconds Page A loads Page B which is an exact copy but without the object. Now I need to have a way to call that image back on a key press. So on Page B I have a form object &quot;listening&quot; for a key press. The only problem is that the form object is visible.

Am I going about this the wrong way? Is there a way to do this (in NS only because it is the closest thing to the browser that I am developing for,) using only one page?

- DB



dgtlby@excite.com
Administrator

UBB Developers Network

 
Of course, focus is impossible to set on invisible object. you are going in the wrong direction. Just put your image in a div:
Code:
<div id=&quot;mySplash&quot;><img src=&quot;yourIMG.gif&quot;></div>
and then in call splash(), i.e. <body onload=&quot;splash()&quot;>
and in the header make these two functions:
Code:
<head>
<script>
function splash()
{
 t=setTimeout(&quot;hideIt()&quot;,8000)
}
function hideIt()
{
 document.all.mySplash.style.visibility=&quot;hidden&quot;;
}
...and that's it. Now if someone wants to see the image again, just change the status of visibility property back to visible.
---
---
 
Ah, but here is the issue. I'm developing for interactive television. The browser that I'm developing for cannot use any CSS. I'm going to have to do this, I think, by toggling the <div> or <layer> on or off, something I haven't had the pleasure of coding yet.

- DB

dgtlby@excite.com
Administrator

UBB Developers Network

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top