datadoit.com
|
| Posted: 05/16/2005, 7:37 AM |
|
CCS 2.3; PHP4; Firefox 1.3; IE 6
Despite having the focus property set for the Page->Client->On Load->Set
Focus, it still does not focus on the field that I want, nor any field on
the page for that matter. Here's the HTML:
//Set Focus @18-D20FE9BF
if (document.forms["Login"] && document.forms["Login"].login)
document.forms["Login"].login.focus();
//End Set Focus
What am I missing?
-MikeR
|
|
|
 |
Uliyr
|
| Posted: 05/16/2005, 11:36 AM |
|
Please folow step by step instruction:
-open login page
-click on login field
-in propirties window select "events" tab
-in Client->OnLoad mouse right click
-choose "add action"
-select Set Focus
-click ok
all done
|
|
|
 |
datadoit.com
|
| Posted: 05/16/2005, 1:13 PM |
|
"Uliyr" <Uliyr@forum.codecharge> wrote in message
news:54288e83c161a8@news.codecharge.com...
> Please folow step by step instruction:
> -open login page
> -click on login field
> -in propirties window select "events" tab
> -in Client->OnLoad mouse right click
> -choose "add action"
> -select Set Focus
> -click ok
>
> all done
>
> ---------------------------------------
I wish it were that simple, but it is not. The field is not getting focus
no matter what I have either in the Page OnLoad, Record Form OnLoad, or
RecordFormField OnLoad.
|
|
|
 |
Nicole
Posts: 586
|
| Posted: 05/17/2005, 1:42 AM |
|
Hello,
JS events produced by CCS may nit work if <body> tag contains some custom Javascrip like
<body onLoad="MyF1()">
_________________
Regards,
Nicole |
 |
 |
datadoit.com
|
| Posted: 05/17/2005, 7:20 AM |
|
"Nicole" <Nicole@forum.codecharge> wrote in message
news:54289ae9309ba9@news.codecharge.com...
> Hello,
> JS events produced by CCS may nit work if <body> tag contains some custom
> Javascrip like
> <body onLoad="MyF1()">
>
> _________________
> Regards,
> Nicole
> ---------------------------------------
No javascripting in the body tag. Below is the entire <head> section of my
login page. Maybe someone can see something I don't.
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="en-us">
<title>NFHS - North Florida Health Services - Login</title>
<link rel="stylesheet" type="text/css"
href="../_themes/xp-clean-blue-yellow-/xp-c1011.css">
<link rel="stylesheet" type="text/css" href="../Themes/Clear/Style.css">
<script language="JavaScript" type="text/javascript">
//Begin CCS script
//Include JSFunctions @1-41467A41
</script>
<script language="JavaScript" type="text/javascript" charset="iso-8859-1"
src="../functions.js"></script>
<script language="JavaScript" type="text/javascript">
//End Include JSFunctions
//page_OnLoad @1-D0F4E1D3
function page_OnLoad()
{
var result;
//End page_OnLoad
//Set Focus @13-D20FE9BF
if (document.forms["Login"] && document.forms["Login"].login)
document.forms["Login"].login.focus();
//End Set Focus
//Close page_OnLoad @1-BC33A33A
return result;
}
//End Close page_OnLoad
//page_Login_Button_Cancel_OnClick @16-96A893F9
function page_Login_Button_Cancel_OnClick()
{
disableValidation = true;
}
//End page_Login_Button_Cancel_OnClick
//page_Button_NewUser_OnClick @14-BF907056
function page_Button_NewUser_OnClick()
{
disableValidation = true;
}
//End page_Button_NewUser_OnClick
//page_Button_SendPassword_OnClick @15-747AE222
function page_Button_SendPassword_OnClick()
{
disableValidation = true;
}
//End page_Button_SendPassword_OnClick
//bind_events @1-4434C983
function bind_events() {
if (document.forms["Login"])
check_and_bind('document.forms["Login"].Button_Cancel','onclick',page_Login_Button_Cancel_OnClick);
check_and_bind('document.all("login")','onclick',page_Button_NewUser);
check_and_bind('document.all("login")','onclick',page_Button_SendPassword);
page_OnLoad();
forms_onload();
}
//End bind_events
window.onload = bind_events; //Assign bind_events @1-19F7B649
//End CCS script
</script>
<script language="javascript">
function printPage(){
version = parseInt(navigator.appVersion)
if (version >= 4) window.print()
}
</script>
</head>
|
|
|
 |
DonB
|
| Posted: 05/17/2005, 1:25 PM |
|
The way I track these kinds of problems down is to open the page in Netscape
and examine the Javascript console (on the menu Tools -> Web Development).
There's likely a Javascript syntax error that kills the setfocus or never
gets to it. Netscape does a good job of telling you where these are and
what the error was, IE does not.
If no errors, then inserting an alert("hello"); into the javascript (moving
it incrementally to see where it quits) let's you figure out where the
problem is.
Odds are the window onload isn't firing, perhaps due to interference from
another Include (if there are any on the page).
--
DonB
http://www.gotodon.com/ccbth
"datadoit.com" <mike@datadoit.com> wrote in message
news:d6cuip$vq5$1@news.codecharge.com...
> "Nicole" <Nicole@forum.codecharge> wrote in message
>news:54289ae9309ba9@news.codecharge.com...
> > Hello,
> > JS events produced by CCS may nit work if <body> tag contains some
custom
> > Javascrip like
> > <body onLoad="MyF1()">
> >
> > _________________
> > Regards,
> > Nicole
> > ---------------------------------------
>
> No javascripting in the body tag. Below is the entire <head> section of
my
> login page. Maybe someone can see something I don't.
>
> <head>
> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
> <meta http-equiv="Content-Language" content="en-us">
> <title>NFHS - North Florida Health Services - Login</title>
> <link rel="stylesheet" type="text/css"
> href="../_themes/xp-clean-blue-yellow-/xp-c1011.css">
> <link rel="stylesheet" type="text/css" href="../Themes/Clear/Style.css">
> <script language="JavaScript" type="text/javascript">
> //Begin CCS script
> //Include JSFunctions @1-41467A41
> </script>
> <script language="JavaScript" type="text/javascript" charset="iso-8859-1"
> src="../functions.js"></script>
> <script language="JavaScript" type="text/javascript">
>
> //End Include JSFunctions
>
> //page_OnLoad @1-D0F4E1D3
> function page_OnLoad()
> {
> var result;
> //End page_OnLoad
>
> //Set Focus @13-D20FE9BF
> if (document.forms["Login"] && document.forms["Login"].login)
> document.forms["Login"].login.focus();
> //End Set Focus
>
> //Close page_OnLoad @1-BC33A33A
> return result;
> }
> //End Close page_OnLoad
>
> //page_Login_Button_Cancel_OnClick @16-96A893F9
> function page_Login_Button_Cancel_OnClick()
> {
> disableValidation = true;
> }
> //End page_Login_Button_Cancel_OnClick
>
> //page_Button_NewUser_OnClick @14-BF907056
> function page_Button_NewUser_OnClick()
> {
> disableValidation = true;
> }
> //End page_Button_NewUser_OnClick
>
> //page_Button_SendPassword_OnClick @15-747AE222
> function page_Button_SendPassword_OnClick()
> {
> disableValidation = true;
> }
> //End page_Button_SendPassword_OnClick
>
> //bind_events @1-4434C983
> function bind_events() {
> if (document.forms["Login"])
>
check_and_bind('document.forms["Login"].Button_Cancel','onclick',page_Login_
Button_Cancel_OnClick);
> check_and_bind('document.all("login")','onclick',page_Button_NewUser);
>
check_and_bind('document.all("login")','onclick',page_Button_SendPassword);
> page_OnLoad();
> forms_onload();
> }
> //End bind_events
>
> window.onload = bind_events; //Assign bind_events @1-19F7B649
> //End CCS script
> </script>
> <script language="javascript">
> function printPage(){
> version = parseInt(navigator.appVersion)
> if (version >= 4) window.print()
> }
> </script>
> </head>
>
>
|
|
|
 |
datadoit.com
|
| Posted: 05/17/2005, 3:46 PM |
|
"DonB" <~ccbth~@gotodon.com> wrote in message
news:d6dk0k$gc8$1@news.codecharge.com...
> The way I track these kinds of problems down is to open the page in
> Netscape
> and examine the Javascript console (on the menu Tools -> Web Development).
> There's likely a Javascript syntax error that kills the setfocus or never
> gets to it. Netscape does a good job of telling you where these are and
> what the error was, IE does not.
>
> If no errors, then inserting an alert("hello"); into the javascript
> (moving
> it incrementally to see where it quits) let's you figure out where the
> problem is.
>
> Odds are the window onload isn't firing, perhaps due to interference from
> another Include (if there are any on the page).
>
> --
> DonB
----------------------------------
Excellent advice DonB! I started dropping in the alerts and narrowed the
problem down to calls to functions that didn't exist. It was looking for
Button_SetPassword() instead of Button_SetPassword_OnClick().
Now recognize that I didn't do anything to these buttons on the page. I
just dropped buttons on there and gave them names, with the intent of coming
back to them later with an action. So for whatever reason CCS set up the
functions and actions by default, albeit incomplete or inaccurate. Just a
heads-up out there. You can see the HTML code that CCS created in the
former thread post.
|
|
|
 |
|