On 8/24/02 2:12 AM, "Seamus Campbell" <[EMAIL PROTECTED]> wrote:
> Hi
>
> can anyone help me here?
>
> I'm getting an error when I attempt to validate my pages
>
> name="login_form" ...
> Error: there is no attribute "NAME" for this element (in this HTML version)
>
> I need to have the name attribute for some javascript - I can't get it to
> work with the id attribute.
> This is my js code:
>
> <script language="JavaScript1.1" type="text/javascript">
> function startform() {
> document.login_form.Login.focus();
> }
> </script>
> </head>
>
> <body bgcolor="#ffffff" onload='startform()'>
>
> Is there a way to identify the form with the id attribute?
>
I've had this problem too ... Like the onload happens too soon, before the
form knows its name.
Leave your function as is, but call it at
the END of the page!
I know this feels "messy", but it always works for me.
...
</body>
<script>startform()</script>
</html>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm