Sigma Php Ajax framework, Ajax Components, GUI Builder
May 23, 2012, 07:33:07 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 submit a form for login  (Read 690 times)
vinu.felix
Jr. Member
**
Posts: 5


View Profile
« on: June 15, 2011, 08:58:10 AM »

I'm a bit confused on the way sigmawidgets handle the submission of variables.

I have a form generated as below:

Quote
            host.pnlhome.append(
                (new linb.UI.Dialog)
                .setHost(host,"dlglogin")
                .setLeft(0)
                .setTop(0)
                .setWidth(294)
                .setHeight(187)
                .setVisibility("visible")
                .setResizer(false)
                .setCaption("Editor Login")
                .setMovable(false)
                .setMinBtn(false)
                .setMaxBtn(false)
                .setRefreshBtn(true)
                .onRefresh("dlglogin_onrefresh")
                .beforeClose("dlglogin_beforeclose")
            );
           
            host.dlglogin.append(
                (new linb.UI.Label)
                .setHost(host,"lblun")
                .setLeft(10)
                .setTop(20)
                .setWidth(70)
                .setCaption("Username")
                .setHAlign("left")
                .setFontWeight("bold")
            );
           
            host.dlglogin.append(
                (new linb.UI.Label)
                .setHost(host,"lblpw")
                .setLeft(10)
                .setTop(70)
                .setWidth(70)
                .setCaption("Password")
                .setHAlign("left")
                .setFontWeight("bold")
            );
           
            host.dlglogin.append(
                (new linb.UI.Input)
                .setHost(host,"txtun")
                .setTips("CDC Email registered as login for entering food claims")
                .setLeft(90)
                .setTop(20)
                .setWidth(150)
                .setTipsErr("Not a valid email address")
                .setDynCheck(true)
                .setLabelCaption("txtun")
                .setValueFormat("^[\\w\\.=-]+@test.com")
                .onHotKeydown("txtun_onhotkeydown")
            );
           
            host.dlglogin.append(
                (new linb.UI.Input)
                .setHost(host,"txtpw")
                .setTips("the password for this account. Please note its different from your CDC password")
                .setLeft(90)
                .setTop(60)
                .setWidth(150)
                .setTipsErr("password cannot be blank")
                .setDynCheck(true)
                .setLabelCaption("txtpw")
                .setValueFormat("[^.*]")
                .setType("password")
                .onHotKeydown("txtpw_onhotkeydown")
            );
           
            host.dlglogin.append(
                (new linb.UI.Button)
                .setHost(host,"btnlogin")
                .setDisabled(true)
                .setTips("login")
                .setLeft(160)
                .setTop(100)
                .setWidth(80)
                .setCaption("LOGIN")
                .onClick("btnlogin_onclick")
                .beforeHoverEffect("btnlogin_beforehovereffect")
            );


The idea is very simple. I need to gather the values of txtun & txtpw and submit it via POST to a page say authorize.php.

What confuses me is the format for submission for linb.request(uri,query,.....) for the 'query' .
How do I convert the value that I get with ns.txtpw...getValue() to the object format (for 'query' in the request(..) for submission? Please help
Logged
linb
Administrator
Hero Member
*****
Posts: 435


View Profile
« Reply #1 on: June 15, 2011, 10:09:57 PM »

There's a DataBinder object.
You can look at this demo:
http://www.linb.net/Examples/comb/survey/index.html
Logged
vinu.felix
Jr. Member
**
Posts: 5


View Profile
« Reply #2 on: June 19, 2011, 12:04:55 PM »

Thanks dude,

That was cool. The frameworks is the best I've seen
Logged
nenesasa
Newbie
*
Posts: 3


View Profile
« Reply #3 on: April 05, 2012, 10:31:30 PM »

informative!!!
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!