Page 5 of 10

Re: FiveWeb Questions

PostPosted: Thu Feb 18, 2016 9:03 pm
by Jeff Barnes
I thought that's what I was doing when I do the following (see last line):

Code: Select all  Expand view

@ 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() ')

 

Re: FiveWeb Questions

PostPosted: Thu Feb 18, 2016 9:09 pm
by Jeff Barnes
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"

Re: FiveWeb Questions

PostPosted: Thu Feb 18, 2016 9:11 pm
by Antonio Linares
Jeff,

Try with:

MsgInfo( Len(aParams) )

Re: FiveWeb Questions

PostPosted: Thu Feb 18, 2016 9:14 pm
by Jeff Barnes
Still get "null"

Re: FiveWeb Questions

PostPosted: Thu Feb 18, 2016 9:25 pm
by Antonio Linares
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 ) ) ) + '")'

Re: FiveWeb Questions

PostPosted: Thu Feb 18, 2016 10:05 pm
by Antonio Linares
Jeff,

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

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

Re: FiveWeb Questions

PostPosted: Thu Feb 18, 2016 10:33 pm
by Enrico Maria Giordano
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

Re: FiveWeb Questions

PostPosted: Fri Feb 19, 2016 12:24 am
by Jeff Barnes
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.

Re: FiveWeb Questions

PostPosted: Fri Feb 19, 2016 6:52 am
by Carles
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

Re: FiveWeb Questions

PostPosted: Fri Feb 19, 2016 9:11 am
by Maurizio
Hello

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

Maurizio
www.nipeservice.com

Re: FiveWeb Questions

PostPosted: Fri Feb 19, 2016 9:22 am
by Antonio Linares
Maurizio,

Why don't you want to use Dolphin ?

Re: FiveWeb Questions

PostPosted: Fri Feb 19, 2016 10:31 am
by Maurizio
Antonio ,
with Fivewin I use ADO , I was looking for something similar .
Nothing against dolphin

Maurizio

Re: FiveWeb Questions

PostPosted: Fri Feb 19, 2016 1:12 pm
by Jeff Barnes
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.

Re: FiveWeb Questions

PostPosted: Fri Feb 19, 2016 6:14 pm
by Antonio Linares
Jeff,

Very good

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

Is it working fine using "|" ?

Re: FiveWeb Questions

PostPosted: Fri Feb 19, 2016 6:19 pm
by Antonio Linares
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