Load file contents to java script

  • 1
  • Question
  • Updated 8 years ago
  • Answered
Hi, I've been trying to get java script to read a txt file, xml file or any kind of file and load the data into a variable. I've been uable to do it. Is this possible in yola?
Photo of xzcallaway


  • 10 Posts
  • 0 Reply Likes
  • happy

Posted 8 years ago

  • 1
Photo of diane


  • 1238 Posts
  • 121 Reply Likes
Hi, xzcallaway,

Javascript is possible with Yola. I am not very good at it but if you post your code (be sure to wrap it in <!-- and --> so the forum doesn't try to render it) someone here may be able to help you. Also, it helps if you have an url or an example of what you are trying to do.
Photo of xzcallaway


  • 10 Posts
  • 0 Reply Likes
Thank you. I'd like to say that I've tried google search and another search engine and they don't work very well. This is the reason why I'm trying to make my own.

There's actually three URLs. The starting URL is http://www.dotdeb.com/start.php from here you can do a search for the word "cards". This will then take you to the second URLwhich is where I want to read a file. It is: http://www.dotdeb.com/search-results.ph . I would like to take the search results and open the file/s with the same names and be able to read which files are for download, which files are for pics, and which files give the descriptions. There is a file in my File Manager that I would like to read at http://www.dotdeb.com/resources/Packa... .

An Example would be to read the file and print the results. Here is one that is not working for me:


File = open('http://www.dotdeb.com/resources/Packa...)
Lines = File.readlines()



ps: I've tried Ajax, Jquery, and other things I've found in forums to do this.
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hello xzcallaway

From what I can see, I don't think this is possible with our Sitebuilder. Perhaps someone here may have an alternative suggestion for you. I'm sorry that I don't have better news.
Photo of xzcallaway


  • 10 Posts
  • 0 Reply Likes
Thank you anyway.