Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

248
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!