FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FiveWeb - tutorial (step by step)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb - tutorial (step by step)
Posted: Mon Apr 22, 2013 11:15 AM
A usual login from the web:

http://www.fivetechsoft.net/cgi-bin/login

http://code.google.com/p/fiveweb/wiki/login_prg



login.prg
Code (fw): Select all Collapse
#include "FiveWeb.ch"

function Main()

   local oDlg, oImg
   local oGetName, cUserName := Space( 30 )
   local oGetPass, cPassword := ""

   DEFINE DIALOG oDlg TITLE "Login" SIZE 650, 400

   @  30,  30 IMAGE oImg FILENAME "../images/user.png" SIZE 120, 120 OF oDlg

   @  69, 190 SAY "User" SIZE 110, 40 OF oDlg

   @ 124, 190 SAY "Password" SIZE 110, 40 OF oDlg

   @  66, 315 GET oGetName VAR cUserName SIZE 300, 40 OF oDlg

   @ 124, 315 GET oGetPass VAR cPassword SIZE 300, 40 OF oDlg PASSWORD

   @ 265, 189 BUTTON "Ok" SIZE 110, 40 OF oDlg ;
      ACTION MsgInfo( oGetName.value + CRLF + oGetPass.value ); // executed in the client in javascript

   @ 265, 335 BUTTON "Cancel" SIZE 110, 40 OF oDlg ;
      ACTION ( oDlg:End() ) // Executed in the server in advance

   ACTIVATE DIALOG oDlg

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 368
Joined: Sun May 31, 2009 06:25 PM
Re: FiveWeb - tutorial (step by step)
Posted: Mon Apr 22, 2013 11:38 AM

Antonio,

What about validation?

Regards,



André Dutheil

FWH 13.04 + HB 3.2 + MSVS 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb - tutorial (step by step)
Posted: Mon Apr 22, 2013 11:40 AM

André,

We could validate localy (using javascript) and/or remotely (accessing the cgibin app again)

I will upload more examples :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 368
Joined: Sun May 31, 2009 06:25 PM
Re: FiveWeb - tutorial (step by step)
Posted: Mon Apr 22, 2013 11:44 AM

Thanks.

Regards,



André Dutheil

FWH 13.04 + HB 3.2 + MSVS 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb - tutorial (step by step)
Posted: Tue Apr 30, 2013 05:58 AM
Toolbars:

http://www.fivetechsoft.net/cgi-bin/testtool



testfold.prg
Code (fw): Select all Collapse
#include "FiveWeb.ch"

function Main()

   local oDlg, oTbr, oBtn1, oBtn2

   DEFINE DIALOG oDlg TITLE "Using toolbars"

   DEFINE TOOLBAR oTbr OF oDlg

   DEFINE BUTTON RESOURCE "ui-icon-seek-start" ;
      OF oTbr ACTION MsgInfo( "one" )

   DEFINE BUTTON RESOURCE "ui-icon-seek-prev" ;
      OF oTbr ACTION MsgInfo( "two" )

   DEFINE BUTTON RESOURCE "ui-icon-play" ;
      OF oTbr ACTION MsgInfo( "three" )

   DEFINE BUTTON RESOURCE "ui-icon-pause" ;
      OF oTbr ACTION MsgInfo( "four" )

   DEFINE BUTTON RESOURCE "ui-icon-seek-next" ;
      OF oTbr ACTION MsgInfo( "five" )

   DEFINE BUTTON RESOURCE "ui-icon-seek-end" ;
      OF oTbr ACTION MsgInfo( "six" )

   ACTIVATE DIALOG oDlg NOWAIT

return nil


standard jquery ui images:
http://jquery-ui.googlecode.com/svn/tags/1.6rc5/tests/static/icons.html
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion