Ejecutar .PRG desde el HTML

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

Ejecutar .PRG desde el HTML

Postby acuellar » Fri May 08, 2020 6:27 pm

Estimados

Éste ejemplo es del Runner
Code: Select all  Expand view

<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.
User avatar
acuellar
 
Posts: 1594
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Ejecutar .PRG desde el HTML

Postby Antonio Linares » Fri May 08, 2020 8:51 pm

Adhemar,

Cual es la URL de la extensión Go Live de vscode ?
regards, saludos

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

Re: Ejecutar .PRG desde el HTML

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

Re: Ejecutar .PRG desde el HTML

Postby acuellar » 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.
User avatar
acuellar
 
Posts: 1594
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Ejecutar .PRG desde el HTML

Postby acuellar » Wed May 13, 2020 4:31 pm

Estimados,
He conseguido que ejecute el .PRG desde el HTML
Así:
Code: Select all  Expand view

<!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.
User avatar
acuellar
 
Posts: 1594
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Ejecutar .PRG desde el HTML

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

Re: Ejecutar .PRG desde el HTML

Postby acuellar » Wed May 13, 2020 5:52 pm

Gracias Antonio

El error e:
Image
Saludos,

Adhemar C.
User avatar
acuellar
 
Posts: 1594
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia


Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 3 guests