FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FiveWeb Questions
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: FiveWeb Questions
Posted: Thu Feb 18, 2016 09:03 PM
I thought that's what I was doing when I do the following (see last line):

Code (fw): Select all Collapse
@ 100, 1050 BUTTON "Save"        SIZE 110, 40 OF oDlg  WHEN lSave ;
      ACTION ('document.location = "'+'?savetest:"+' + ;
         'document.getElementById( "oGet" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet0" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet1" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet2" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet3" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet4" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet5.at" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet6" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet7" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet8" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet9" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet10" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet11" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet12" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet13" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet14" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet15" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet16" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet17" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet18" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet19" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet20" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet21" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet22" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet23" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet24" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet25" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet26" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oCbx.at" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet28" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet29" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet30" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet31" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet32" ).value.trim() + ":" + '+ ;
         'document.getElementById( "oGet33" ).value.trim() + ":" + '+ ;
         'document.getElementById( "file" ).value.trim() ')
Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: FiveWeb Questions
Posted: Thu Feb 18, 2016 09:09 PM

I am going crazy....

I'm pretty sure the last item is the 37 item in aParams.....
So when I try to save aParmas[37] to my DBF I get nothing.

Since it's the last item I tried:
nFile:= Len(aParams) and used aParmas[nFile] instead of aParpam[37] .... it works.

Odd thing is, if I do a MsgInfo(nFile) I get "null"

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Thu Feb 18, 2016 09:11 PM

Jeff,

Try with:

MsgInfo( Len(aParams) )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: FiveWeb Questions
Posted: Thu Feb 18, 2016 09:14 PM

Still get "null"

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Thu Feb 18, 2016 09:25 PM

Jeff,

MsgInfo() is a javascript implemented function in FiveWeb, thats why we can not provide Harbour variables to it.

This way we can provide our Harbour variables values to javascript:

@ 200, 200 BUTTON "test" ACTION "" OF oDlg

ATail( oDlg:aControls ):cAction = 'MsgInfo("' + Alltrim( Str( Len( aParams ) ) ) + '")'

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Thu Feb 18, 2016 10:05 PM
Jeff,

By the way, a reminder about the FiveWeb forms designer that it is available from here:

http://www.fivetechsoft.net/cgi-bin/fiveform
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: FiveWeb Questions
Posted: Thu Feb 18, 2016 10:33 PM
Jeff Barnes wrote:I am going crazy....

I'm pretty sure the last item is the 37 item in aParams.....
So when I try to save aParmas[37] to my DBF I get nothing.


Try aParams[36]. Javascript arrays indexes are zero based (ie. from aParams[0] to aParams[36]).

EMG
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: FiveWeb Questions
Posted: Fri Feb 19, 2016 12:24 AM

Using the sample from Antonio it does return 37.
No idea why it works with aParams[nFile] but not aParams[37]

The field before it lines up at [36] so [37] should work. It's strange.

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 1283
Joined: Fri Feb 10, 2006 02:34 PM
Re: FiveWeb Questions
Posted: Fri Feb 19, 2016 06:52 AM

Jeff,

Enrico is right. Surely nLen is 37 but the last one is 36 index

Finally u can do console.log( aParams[ 36] ) and the same with console.log( aParams[ 37] ) to verify it

Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
HIX -> https://github.com/carles9000/hix
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Re: FiveWeb Questions
Posted: Fri Feb 19, 2016 09:11 AM

Hello

is it possible use mysql on a server linux without use dolphin ?

Maurizio

www.nipeservice.com

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Fri Feb 19, 2016 09:22 AM

Maurizio,

Why don't you want to use Dolphin ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Re: FiveWeb Questions
Posted: Fri Feb 19, 2016 10:31 AM

Antonio ,
with Fivewin I use ADO , I was looking for something similar .
Nothing against dolphin

Maurizio

Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: FiveWeb Questions
Posted: Fri Feb 19, 2016 01:12 PM

I might have stumbled on to what is messing me up here....

When returning the filename, it sends "C:\fakepath\myfile.ext"
Since FiveWeb is using the colon (:) to separate items, "C" and "\fakepath\myfile.ext" are seen as two separate items.

Maybe the pipe (|) symbol would be a better choice for separating the items.
The colon is used more often like in time (12:30:00) or as above in file paths.

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Fri Feb 19, 2016 06:14 PM

Jeff,

Very good

Yes, we should not use ":" to parse the parameters

Is it working fine using "|" ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Fri Feb 19, 2016 06:19 PM

Maurizio,

As far as I know there is no ADO for Linux

Maybe installing .NET (or Mono). But surely is not something simple.

You may consider to use Dolphin

regards, saludos

Antonio Linares
www.fivetechsoft.com