FiveWeb - tutorial (step by step)

Re: FiveWeb - tutorial (step by step)

Postby Antonio Linares » 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

Image

login.prg
Code: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb - tutorial (step by step)

Postby ADutheil » Mon Apr 22, 2013 11:38 am

Antonio,

What about validation?
Regards,

André Dutheil
FWH 13.04 + HB 3.2 + MSVS 10
ADutheil
 
Posts: 368
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Re: FiveWeb - tutorial (step by step)

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb - tutorial (step by step)

Postby ADutheil » Mon Apr 22, 2013 11:44 am

Thanks.
Regards,

André Dutheil
FWH 13.04 + HB 3.2 + MSVS 10
ADutheil
 
Posts: 368
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Re: FiveWeb - tutorial (step by step)

Postby Antonio Linares » Tue Apr 30, 2013 5:58 am

Toolbars:

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

Image

testfold.prg
Code: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 99 guests

cron