• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

How can I show JSON information with Javascript on my HTML page?

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone,

I am practicing a bit with Javascript and JSON. But now I want to do something to make my code look better.

I am creating a website and a script that is showing one question at one website. When I click on 'Question 1' it shows one question at question.html. When I click on 'Question 2' it shows the one other question at question.html etc... I already have this piece of code.
What I would like to improve is that I am retrieving it from the JSON file, at the moment I'm retrieving it from my Javascript file. I already tried some things but I can't figure it out..

index.html



main.js


question.html


questions.js


questions.json


I hope someone can help me!
Thanks for the effort!




 
Ranch Hand
Posts: 98
Angular Framework Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rico Papillon,

I am confused with use case why you are navigating to question.html once i selected question number. how can i select one more question option from question.html
 
Bartender
Posts: 584
14
IntelliJ IDE Spring Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What exactly isn't happening that you want to happen?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic