Hmm... OK, that works on a test page but I now have another problem...
My body tag is located on a template and I don't have access to it on the page I need to set the focus on.
Or, to be more precise, I would like to dynamically set the control that gets the focus based on the page that is loading...
So... Can I put the java script code in the base template? Then I need a way to set the body tag on each page to the correct control for the page.
I think I would like to do something like the following in the body tag.
I know my syntax is not correct but you get the idea ...
First set a param $NameVar on the page that is loading to the control name.
<?php $NameVar = "message"; ?>
Then call the function with $NameVar as a param.
"<body <?php if( $NameVar <> null ) echo( onload="setFocus( $NameVar )" ); ?> >"
Sorry for the noob questions but I'm an old C++ guy and fresh into web development. I'm learning the code but Java Script has been down the priority list a bit. :) PhP, HTML, and XML among others have been quite enough to keep me busy so far.
...