Sigma Php Ajax framework, Ajax Components, GUI Builder
May 23, 2012, 10:13:55 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: How to execute js-code which doesn't belong to the sigma-class  (Read 771 times)
gikotim
Sr. Member
****
Posts: 49


View Profile
« on: January 06, 2010, 01:48:07 PM »

I try to put in some "business logic" behind the GUI. I stripped it to a short example. When you press a button some function should be called.



This code works, but after appending the function to the end of the code I can't return to the GUI Builder.
What is the "right" way to include functions not belonging to the GUI code?

Thank you so much for all your support.
Logged
linb
Administrator
Hero Member
*****
Posts: 435


View Profile
« Reply #1 on: January 06, 2010, 04:20:16 PM »

Put your "business logic" code in another js file, or wrap it into the current "linb.Com" file.
Logged
gikotim
Sr. Member
****
Posts: 49


View Profile
« Reply #2 on: January 07, 2010, 12:27:06 AM »

okay, I dit it. Here my example, maybe it help another dummy like me  Roll Eyes




One thing is still unclear to me: how can I declare and initialize global variables? in iniResources it gets initialized but, the scope is wrong. Where to declare?


Thank you for your help
« Last Edit: January 07, 2010, 01:46:27 AM by gikotim » Logged
linb
Administrator
Hero Member
*****
Posts: 435


View Profile
« Reply #3 on: January 07, 2010, 04:35:45 PM »

global:

window.myVar = "any var";
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!