javascript : Onload event

A place for users and developers of the Xataface to discuss and receive support.

javascript : Onload event

Postby Jean » Tue Nov 03, 2009 7:29 am

Hi Steve,

I need to have a focus on a field in the new form. I know how to do it in a form but on Xataface I don't know have the onLoad event. I tried to create in javascript.js a bodyOnload() function but no result.

Code: Select all
function bodyOnload(){
document.getElementById('nom_famille').focus();
}


Can you put me on the right track ?

Thank you
Jean
Jean
 
Posts: 259
Joined: Wed Nov 07, 2007 1:30 am
Location: Pau, France

Postby shannah » Tue Nov 03, 2009 5:48 pm

I seem to recall adding this functionality to the fields.ini file a while back. Try using the widget:focus directive in the fields.ini file:

e.g.
Code: Select all
[myfield]
    widget:focus=1
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby Jean » Wed Nov 04, 2009 12:38 am

Thank you Steve, it works, you're amazing!!!
:o
Jean
 
Posts: 259
Joined: Wed Nov 07, 2007 1:30 am
Location: Pau, France


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 27 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved