CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Set Focus

Print topic Send  topic

Author Message
manuel

Posts: 48
Posted: 04/08/2013, 7:31 PM

I have 3 forms in a page: a Search Form and 2 Record Forms

The record forms are hidden until a search is performed, I need to change the "Set Focus" action to a field in the record form once its visible, I set the action on all 3 forms, but the focus remains in the search field.

I've noted that the Focus action is on the .html part of the code, what I must change to achieve this?
View profile  Send private message
Lucius

Posts: 220
Posted: 04/09/2013, 2:38 PM

Does the search do a page refresh?

If so, then client-side set focus action will not work...

You will need to approach this differently:

- use OnLoad client-side event, then code in JavaScript (or maybe it could be possible to use CCS Clien-side condition builder)
- in this event check if there is a record form visible,
- if so, then set focus on the control you want
View profile  Send private message
manuel

Posts: 48
Posted: 07/11/2013, 2:28 PM

Thanks it works... almost

I set the On Load Client side action to set focus, when I do a search the correct field field in the record form gets the focus.

The problem now is that the Search form never gets the focus (only the search form is shown the first time the page is loaded), even when I set the SetFocus even correctly.

More strange is that, if I delete the other two forms (Record Forms) then the SetFocus even for the Search Form works correctly.

is this a bug or I'm doing something wrong?
View profile  Send private message
Lucius

Posts: 220
Posted: 07/16/2013, 8:06 AM

Do you have an Update Panel on that page too, containing those forms and records?
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.