You are here: SetFocus issue... « HTML « IT news, forums, messages
SetFocus issue...

Posted by NiallM on 10/09/32 11:32

Any chance anyone could spare a sec to see where i'm going wrong here?

On loading a page i'm trying to sefocus to a button on the page, (the only
button) so that I can press return and it will have the effect of clicking
it.

Here is what I'm doing at the moment but it's still not passing focus...

<HTML>
<HEAD>

<script type="button/javascript">

function setFocus()
{
document.button.focus();
}
</script>

</HEAD>
<TITLE>Successful logout</TITLE>

<BODY class="PageBody" onload=setFocus() >
<BR><BR><BR><BR><BR><BR><BR>
<TABLE class="WidgetPanel">
<TR>
<TD class="WidgetCell" align="center">
<SPAN class="DataLabel">
You have been logged out successfully.
<BR><BR><BR><BR><BR>
</SPAN>
</TD>
</TR>
<TR>
<TD align="center">
<INPUT class="button" type="button" onclick="location.replace(
'./index.jsp' )" value="Login" />
</TD>
</TR>
</TABLE>
</BODY>
</HTML>


Cheers if anyone has any idea's

N.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация