Win a copy of Programmers Guide to Apache Thrift this week in the Open Source forum!
  • 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
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

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

 
Greenhorn
Posts: 6
  • 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
 
Rancher
Posts: 427
6
Fedora IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly isn't happening that you want to happen?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!