Some questions and two solutions

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!
Post Reply
User avatar
Massimo Linossi
Posts: 474
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Some questions and two solutions

Post by Massimo Linossi »

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

Re: Some questions and two solutions

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Some questions and two solutions

Post by Antonio Linares »

2. With this javascript code you can call a PRG from javascript:

Code: Select all

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
Post Reply