• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

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

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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: 97
AngularJS Chrome Linux
  • Mark post as helpful
  • send pies
  • 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
 
Master Rancher
Posts: 451
6
IntelliJ IDE Spring Fedora
  • Mark post as helpful
  • send pies
  • 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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!