Sigma Php Ajax framework, Ajax Components, GUI Builder
May 23, 2012, 09:17:44 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Create and destroy a dialog  (Read 945 times)
gikotim
Sr. Member
****
Posts: 49


View Profile
« on: January 04, 2010, 02:18:46 PM »

I try to create a dialog when a button is pressed, and destroying the dialog with a button in the dialog.
I don't know why the event handler for closing the dialog isn't called.

Can you give me a hint?

Thank you very much for your support.


Here the sample code:

Logged
linb
Administrator
Hero Member
*****
Posts: 435


View Profile
« Reply #1 on: January 04, 2010, 09:23:51 PM »

"button7" will find "_button7_onclick" from its "host". Here, you set host to "dialog1", but "_button7_onclick" is in the com.
Logged
gikotim
Sr. Member
****
Posts: 49


View Profile
« Reply #2 on: January 04, 2010, 10:00:57 PM »

I see. How to change this?
I found a solution, but it's not so elegant:



Which has lead me to my next problem: I try to change the caption of the button within the onClick-handler. It doesn't work with localisation!
It just shows: "$app.caption.logout_but" instead of the string from the localisation-file.

Can you help me?
Logged
linb
Administrator
Hero Member
*****
Posts: 435


View Profile
« Reply #3 on: January 05, 2010, 12:53:33 AM »

"$app.caption.login_ok_but" will try to get text from  path  "linb.Locale.en.app.caption.login_ok_but".

You can load a js file(in your html file or whatever other ways):

linb.Locale.en.app = {
  caption:{
   login_ok_but:"your caption"
  }
};
Logged
gikotim
Sr. Member
****
Posts: 49


View Profile
« Reply #4 on: January 06, 2010, 01:44:36 PM »

Please excuse me, I don't understand exactly what you mean.
Would you mind giving me an example of how to change the text of a label dynamically with the correct text out of a language file?

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!