Ignition Web Dev

Hi, I want to do this


so I use this url http://10.10.100.103:8088/system/webdev/ApagadoProgramado_pt/charts/resumen?anio=2025&mes=6
because I have all of this but this send me an error

I want to obtain the data that the user digit in the url such as javascript.

The final idea is that I send in an html data in a form and the javascript receive and do graphs, i need this because i can use highcharts.js please.

You need to return a dictionary with one of the specific values the webdev module understands - you don't directly return text from your webdev function:

As in:
return {'response': u"Año: 25 | Mes: 2"}


I need the answer that appears in the dictionary to be displayed in the JavaScript console as if I were using console.log(year) or console.log(month), or even in dictionary format, but I keep getting the error when using it.
Or what I need to do to resolve something like this ?
This is my url: http://10.10.100.103:8088/system/webdev/ApagadoProgramado_pt/charts/resumen?anio=2025&mes=6

This code is not executing in your browser, it is executing on your gateway. console.log is not a valid function. Use a logger from system.util.logger to log the values to your gateway log file for inspection.

You are receiving the 500 error due to the invalid function you are attempting to call. Your gateway logs should also show a warning or error stating such.

3 Likes

Ok, but I only wants to send the data via url (CLIENT) and obtain the data via javascript (SERVER) it is possible or not ? using the def doGet(request, session): can someone help me with a simple example or how can i do this please ?

shameless plug: Ignition Exchange | Inductive Automation
The first example has a get returning bytes, but the format can be changed to text or json.

This seems to indicate a fundamental misunderstanding of something on your part.

Can you take a step back and describe the general problem you are trying to solve via the Webdev module?

The problem I had was that I couldn't get any return data, but I solved it with the JSON format. When I called, I forgot to include the .py file in the web address, otherwise I would keep getting an error. Thanks to everyone.