FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index mod_harbour Ejecutar .PRG desde el HTML
Posts: 1710
Joined: Tue Oct 28, 2008 06:26 PM
Ejecutar .PRG desde el HTML
Posted: Fri May 08, 2020 06:27 PM
Estimados

脡ste ejemplo es del Runner
Code (fw): Select all Collapse
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="modharbour.js"></script>
</head>
<body>
<div id="code">
</div>
<script>RunPrg("test.prg");</script>
</body>
</html>

Con la extensi贸n Go Live de VSCode funciona
http://127.0.0.1:5500/run_hosted_prg.html

Harbour 3.2.0dev (r2004201301)

Y con
http://127.0.0.1/runner/run_hosted_prg.html (LocalHost no funciona)
Error: Syntax error "syntax error at '<'"
operation: line:1
called from: HB_COMPILEFROMBUF, line: 0
called from: ../apache.prg, EXECUTE, line: 130
called from: pcode.hrb, RUN, line: 17
called from: HB_HRBDO, line: 0
called from: ../apache.prg, EXECUTE, line: 132

Source:

Porqu茅?

Gracias por la ayuda
Saludos,



Adhemar C.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Ejecutar .PRG desde el HTML
Posted: Fri May 08, 2020 08:51 PM

Adhemar,

Cual es la URL de la extensi贸n Go Live de vscode ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Ejecutar .PRG desde el HTML
Posted: Fri May 08, 2020 08:59 PM

Has hecho git clone https://github.com/lorenzodla/mod_harbour_runner para tener todo igual que en el repo ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1710
Joined: Tue Oct 28, 2008 06:26 PM
Re: Ejecutar .PRG desde el HTML
Posted: Sat May 09, 2020 12:50 PM

Estimado Antonio

La extensi贸n es Live Server Es para HTML, La idea es usar un index.html luego enlazar los prg

Descargu茅 el Zip mod_harbour_runner-master lo descomprim铆 y coloque la carpeta en htdocs
Las otras dos opciones funcionan.

Gracias por la ayuda

Saludos,



Adhemar C.
Posts: 1710
Joined: Tue Oct 28, 2008 06:26 PM
Re: Ejecutar .PRG desde el HTML
Posted: Wed May 13, 2020 04:31 PM
Estimados,
He conseguido que ejecute el .PRG desde el HTML
As铆:
Code (fw): Select all Collapse
<!DOCTYPE html>
<html lang="es">

<head>
聽 <meta charset="utf-8">
聽 <meta http-equiv="x-ua-compatible" content="ie=edge">
聽 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
聽 <meta name="author" content="Adhemar Cu茅llar R.">
聽 <meta name="copyright" content="AcrSoft 漏 System">
聽 <link rel="shortcut icon" href="http://190.171.250.70/MovieCenter/images/moviecenter.ico">
聽 <title>MovieCente - S茅ptimo arte</title>
聽 <meta name="generator" content="Jekyll v3.8.5">

聽 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
聽 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
聽 <script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
聽 <script src="https://cdn.datatables.net/1.10.19/js/dataTables.bootstrap4.min.js"></script>
</head>

<body class="py-4">
聽 <style>
聽 聽 .myhead {
聽 聽 padding: 5px;
聽 聽 background-color: white;
聽 聽 margin-bottom: 2px;
聽 }

聽 .myhead>span {
聽 聽 font-family: times, Times New Roman, times-roman, georgia, serif;
聽 聽 font-size: 28px;
聽 聽 line-height: 40px;
聽 聽 letter-spacing: -1px;
聽 聽 color: #444;
聽 }
聽
聽 聽 nav {
聽 聽 聽 width: 100%;
聽 聽 聽 height: 20px;
聽 聽 聽 background: rgb(187, 175, 175);
聽 聽 聽 color: black;
聽 聽 聽 display: flex;
聽 聽 聽 align-items: center;
聽 聽 }

聽 聽 nav a {
聽 聽 聽 聽font-family: times, Times New Roman, times-roman, georgia, serif;
聽 聽 font-size: 12px;
聽 聽 聽 color: rgb(35, 8, 185);
聽 聽 聽 text-decoration: none;
聽 聽 聽 display: inline-block;
聽 聽 聽 padding: 0 15px;
聽 聽 }
聽 </style>
聽 <div class="container">
聽 聽 <div class="myhead">
聽 聽 聽 <a href="https://adhemarcr.github.io/acrsoft/" target="_blank"><img
聽 聽 聽 聽 聽 src="http://190.171.250.70/MovieCenter/images/poster.jpg" width="110" height="110"></a>
聽 
聽 聽 聽 <span>MovieCenter - S茅ptimo arte</span>
聽 聽 聽 <a href="https://adhemarcr.github.io/acrsoft/" target="_blank"><img
聽 聽 聽 聽 聽 src="https://acrsofts.github.io/moviecenter/images/lAcrSoft.jpg" width="120" height="65"></a><br><br>
聽 聽 
聽 聽 聽 聽 聽 <a href="index.html"target="_blank"><img
聽 聽 聽 聽 聽 聽 src="http://190.171.250.70/MovieCenter/images/todas.jpg" width="80" height="40"></a>
聽 聽 聽 
聽 聽 聽 聽 聽 聽 <a href="AyS.html" target="_blank"><img
聽 聽 聽 聽 聽 聽 聽 src="https://acrsofts.github.io/moviecenter/images/AyS.jpg" width="80" height="40"></a><br>
聽 聽 聽 聽 
聽 聽 聽 聽 聽 <nav>
聽 聽 聽 <a href=index.html>聽聽聽聽Todas</a>
聽 聽 聽 <a href=AyS.html>Acci贸n y Suspenso</a>
聽 聽 </nav>
聽 </div>
聽 聽 <div class="row">
聽 聽 聽 <div class="col-sm-12">
聽 聽 聽 聽 <table id="muestra" class="table table-striped table-bordered" style="width:100%">
聽 聽 聽 聽 聽 <thead>
聽 聽 聽 聽 聽 聽 <tr>
聽 聽 聽 聽 聽 聽 聽 <th>NOMBRE</th>
聽 聽 聽 聽 聽 聽 聽 <th>DURACION</th>
聽 聽 聽 聽 聽 聽 聽 <th>REPARTO</th>
聽 聽 聽 聽 聽 聽 </tr>
聽 聽 聽 聽 聽 </thead>
聽 聽 聽 聽 </table>
聽 聽 聽 聽
聽 聽 聽 </div>
聽 聽 聽

聽 聽 聽<script>
聽 聽 聽 聽 $(document).ready(function () {

聽 聽 聽 聽 聽 $('#muestra').DataTable({

聽 聽 聽 聽 聽 聽 "ajax": "todas.prg",
聽 聽 聽 聽 聽 聽 "scrollCollapse": true,
聽 聽 聽 聽 聽 聽 "paging": true,
聽 聽 聽 聽 聽 聽 "columns": [{
聽 聽 聽 聽 聽 聽 聽 聽 "data": "nombre"
聽 聽 聽 聽 聽 聽 聽 },
聽 聽 聽 聽 聽 聽 聽 {
聽 聽 聽 聽 聽 聽 聽 聽 "data": "duracion"
聽 聽 聽 聽 聽 聽 聽 },
聽 聽 聽 聽 聽 聽 聽 {
聽 聽 聽 聽 聽 聽 聽 聽 "data": "reparto"
聽 聽 聽 聽 聽 聽 聽 }
聽 聽 聽 聽 聽 聽 ]
聽 聽 聽 聽 聽 });
聽 聽 聽 聽 });

聽 聽 聽 </script>
聽
聽 聽 聽 <footer id="footer" class="row align-items-end">
聽 聽 聽 聽 <a href="https://adhemarcr.github.io/acrsoft/" target="_blank"><img
聽 聽 聽 聽 聽 src="https://acrsofts.github.io/moviecenter/images/lAcrSoft.jpg" width="120" height="65"></a> 
聽 聽 聽 聽 <h7>By Adhemar Cu茅llar R. <br> AcrSoft System 漏2020聽</h7>
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 
聽 聽 聽 聽 聽 <table border="0" align="right" cellpadding="0" cellspacing="0">
聽 
聽 聽 聽 聽 聽 <tr>
聽 聽 聽 聽 聽 聽 <td colspan="2" align="right">
聽 聽 聽 聽 聽 聽 聽 <h9>聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽Powered by ModHarbour</h9>
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
聽 聽 聽 聽 聽 聽 <a href="https://winhotel.space/modharbour/modharbouronline.prg" target="_blank"><img
聽 聽 聽 聽 聽 聽 聽 聽 聽 src="https://acrsofts.github.io/moviecenter/images/hfw.jpg" width="70" height="70" class="opacity"></a>
聽 聽 聽 聽 聽 聽 </td>
聽 聽 聽 聽 聽 </tr>
聽 聽 聽 聽 </table>
聽 
聽 聽 聽 </footer>

</body>

</html>

Funciona en el LocalHost y con IP p煤blica http://190.171.250.70/MovieCenter/
No he logrado hacerlo funcionar con mi repositorio de Github https://acrsofts.github.io/moviecenter/ no encuentra la BASE

Mi repositorio es: https://github.com/acrsofts/moviecenter

Preguntas:
C贸mo se hace para mostrar caractes especiales 谩茅铆贸煤帽 (OemToAnsi)?
C贸mo se hace para que sea un sitio seguro y funcione con https?

Lo he hecho un poco repetitivo. Todo consejo y ayuda es bienvenida.

Con la extensi贸n Live Server (Go live) funciona. Pero al ejecutar el prg sale que no encuentra la base, el mismo error que genera desde el acrsofts.github.io/moviecenter

Muchas gracias por la ayuda
Saludos,



Adhemar C.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Ejecutar .PRG desde el HTML
Posted: Wed May 13, 2020 05:14 PM

Adhemar,

Muy bien :-)

> Pero al ejecutar el prg sale que no encuentra la base

Que error te aparece exactamente ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1710
Joined: Tue Oct 28, 2008 06:26 PM
Re: Ejecutar .PRG desde el HTML
Posted: Wed May 13, 2020 05:52 PM
Gracias Antonio

El error e:
Saludos,



Adhemar C.

Continue the discussion