Some questions and two solutions

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!

Some questions and two solutions

Postby Massimo Linossi » Fri Aug 16, 2019 7: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
User avatar
Massimo Linossi
 
Posts: 498
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Some questions and two solutions

Postby Antonio Linares » Sat Aug 17, 2019 6:10 am

regards, saludos

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

Re: Some questions and two solutions

Postby Antonio Linares » Sat Aug 17, 2019 6:13 am

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

Code: Select all  Expand view
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
User avatar
Antonio Linares
Site Admin
 
Posts: 42097
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 11 guests