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

264
Vistas
Please clarify how to use Framework7 ajax (to trigger server side processing)

please can someone clarify what I need to do in a framework7/node-js app to trigger a server-side function from client-side? I want a server side script (coded by me) to compile a json file and send me back the name/url before I request that new json file from server side to client side.

This link shows "Request/ajax" in framework7 documentation [1]: https://framework7.io/docs/request.html But there is nothing that I could find about specifying a response.

I can use the below function to get a static already existing json file/data from the server:

//below code placed inside 'pageInit' block 
//in the code block 'var app = new Framework7({ })'
//in app.js file

app.request.get("/assets/datafile.json", function (data){ 
   
    //turn json data into a javascript object
    var mobj = JSON.parse(data);
}

I've tried to use node_modules, but the function 'require(module)' which is used to import modules is not available to use from client side files...

I selected 'include bundler' in the npm set up of the project directory, and now I'm working with 'vite'. So I can't find a server file to edit if needed.

I've become confused as how to fetch dynamic data in this situation. I've read online to use a XMLHttprequest on a server side API, I've read you have to wrap the server side code in a 'route', I've read you have to change the server file code, I've read you can use a php script, but I haven't been able to make this thing work with Framework7.

If anyone knows how to do this, please give us a hint. Thanks.

about 4 years ago · Juan Pablo Isaza
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