Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

115
Vistas
Typo3 jQuery OnClick Events

i need some help for my fresh installed Typo3 Website.

I want to set new Values within my DataBase via jQuery onClick Event. So i guess i need to make use of this class: TYPO3\CMS\Core\Database\ConnectionPool. Can someone Guide me how i can make use of this class within JavaScript.

I already tried the following, but i can't get it to work

define(['jquery', 'TYPO3\CMS\Core\Database\ConnectionPool'], function($, conPool) {

   if(conPool.foo == 'bar'){
      conPool.init();
   }
});

Typo3 source

I appreciating any Help. Thanks

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Your frontend should not be allowed to communicate directly with the database of your TYPO3 instance.
If you allow it anyone can inspect your javascript and get credentials to access your database - and do anything they like. :(

The correct way is a server request with the data you want to change.
then some PHP can compute the data (verify, adapt, ...) and change the value in the database (as PHP has the local credentials to access the database). Then it's up to you to give a notice in the front end if that operation was successful or not.
Such a server-request could be a complete page request, but a simple AJAX-call would be enough. Though you does not need to rebuild the complete page. From the Return of that AJAX request you can show only a notice about failure or success as a flash-message or similar.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda