+ 1

[help] loading data from local text or XML file using jquery or php and displaying in DOM

the very simple task i want to accomplish is that i want to load up a text file locally offline (if jQuery) or on server's local (if php) , create an array from the file's lines and then append them to DOM one by one upon a button click, replacing previous line from DOM I want to make it as simple as possible . my task is to create a MCQ test web app and add up points upon finishing the test/game. most importantly ! i don't have much experience in php. thanks

8th Mar 2018, 4:37 PM
Aman Kumar
Aman Kumar - avatar
2 odpowiedzi
+ 1
A line-oriented approach is a bad idea for DOM, as it's a hierarchical structure and you don't know what you might be cutting into. For PHP, look for the domdocument class in the online documentation at www.php.net.
27th Mar 2018, 5:25 AM
Yves Sucaet
Yves Sucaet - avatar
0
well thanks, but i got success in retrieving data with a ultra simple .get() function in jquery.
27th Mar 2018, 9:58 AM
Aman Kumar
Aman Kumar - avatar