Can Xano output HTML?
Options
![Mr_English](https://us.v-cdn.net/6037124/user_avatars/1271230.jpg)
Mr_English
Member ✭
I want to take a list of values from a table and display them in an HTML select. I was wondering if XANO could do some of the work, i.e. by generating the HTML.
For example if my table 'Items' contained column of unique values called 'itemname', could XANO return, for each row, a string like this:
itemname1
itemname2
itemname3
...
Thanks.[x-sel.jpg]
For example if my table 'Items' contained column of unique values called 'itemname', could XANO return, for each row, a string like this:
itemname1
itemname2
itemname3
...
Thanks.[x-sel.jpg]
Comments
-
I'm curious to hear from someone more experienced, but my understanding is that the front-end would handle the logic you're describing.
Is there a particular reason you'd like the back-end to handle this? Are you using a no-code front-end with a particular limitation, for example? -
Hi thanks for responding. Yes, my application is built with node.js and express.js. The select will display data from a Xano table. The select would need to be built either in the browser or on the server and I was interested to see if it was more efficient to get some of it built with Xano.
-
Xano always wants to return JSON AFAIK. You could have it return a JSON payload that contains your HTML string. But even more, you'd rather have Xano return data, and have the job of turning it into HTML or DOM elements on your front-end be the job of your front-end system. This is the way all modern web frameworks work that I can think of. (I am old enough that I remember doing it the harder way, along the lines of what you are describing, in the 2000s)
-
Yeah I was trying to keep as much out of the client as possible. But, as you write, this is probably an approach from the past.
Thanks, Tony
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback