FiveWeb Questions

Re: FiveWeb Questions

Postby Jeff Barnes » Thu Feb 18, 2016 9:03 pm

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

 
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Jeff Barnes » Thu Feb 18, 2016 9: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)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Antonio Linares » Thu Feb 18, 2016 9:11 pm

Jeff,

Try with:

MsgInfo( Len(aParams) )
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 Questions

Postby Jeff Barnes » Thu Feb 18, 2016 9:14 pm

Still get "null"
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

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

Re: FiveWeb Questions

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

Re: FiveWeb Questions

Postby Enrico Maria Giordano » 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
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: FiveWeb Questions

Postby Jeff Barnes » 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)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Carles » Fri Feb 19, 2016 6: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
Skype -> https://join.skype.com/cnzQg3Kr1dnk
User avatar
Carles
 
Posts: 1090
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona

Re: FiveWeb Questions

Postby Maurizio » Fri Feb 19, 2016 9:11 am

Hello

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

Maurizio
www.nipeservice.com
User avatar
Maurizio
 
Posts: 796
Joined: Mon Oct 10, 2005 1:29 pm

Re: FiveWeb Questions

Postby Antonio Linares » Fri Feb 19, 2016 9:22 am

Maurizio,

Why don't you want to use Dolphin ?
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 Questions

Postby Maurizio » Fri Feb 19, 2016 10:31 am

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

Maurizio
User avatar
Maurizio
 
Posts: 796
Joined: Mon Oct 10, 2005 1:29 pm

Re: FiveWeb Questions

Postby Jeff Barnes » Fri Feb 19, 2016 1: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)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

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

Re: FiveWeb Questions

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

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 101 guests