FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index mod_harbour Some questions and two solutions
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Some questions and two solutions
Posted: Fri Aug 16, 2019 07:36 PM

Hi.
I have some questions on how to solve some little way of programming with mod_harbour.
1- input numbers with formatting.
2- validating an input text field like the valid in harbour (going to a function for reading a table, looking for a code and returning back a string to place near the field on the form)
3- testing for browser in use

The th tag for tables in not left align but always centered in Safari. For solving you must use the td tag with strong style.
I spent a lot of time for input date fields, because with the datepicker is different on every browser. I'm making some tests but probably I have solved the problem.
In the next day I'll publish some code for making the date input works correctly.
Thanks a lot.
Massimo

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Some questions and two solutions
Posted: Sat Aug 17, 2019 06:10 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Some questions and two solutions
Posted: Sat Aug 17, 2019 06:13 AM
2. With this javascript code you can call a PRG from javascript:

Code (fw): Select all Collapse
function RunCode( cCode, cResultId )
{
   var o = new Object();
   var cResult;
   
   if( cResultId == null )
      cResultId = "#memo";
   
   o[ 'source' ] = atob( cCode );
   console.log( 'PARAM', o );
            
   $.post( "run.prg", o )
      .done( function( data ) { console.log( 'DONE', data ); $( cResultId ).html( data ); } )
      .fail( function( data ) { console.log( 'ERROR', data ); } );
}
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion