Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Javascript Help

  1. Oct 1, 2005 #1
    Is there any way that I can use JS to read a directory on the web server and use that information on the web page?

    I originally did this in PHP, but the server I built the site for has no PHP installed and the admin does not want to install it. On top of this, there is no CGI or ASP functionality set up.

    so, I figure, rather than generating static pages on my computer when new data is added to the server and then uploading the page, I could perhaps use Javascript. I have not used JS much because I do not think it does much for you, especially when you use server side scripting (form validation is the only place I would normally use it).

    any ideas?
     
  2. jcsd
  3. Oct 1, 2005 #2

    dduardo

    User Avatar
    Staff Emeritus

    I guess you could embedded everything you need in a .js file, but that would be a pain. You'll need to write functions to extract data and create a dom structure.
     
  4. Oct 1, 2005 #3
    perhaps I will just use an <object> tag to use the php output from a server that runs PHP now.

    any way I can host the files on the main server and have the php read those files? I tried by just adding the domain to the front of the directory (http://blah.blah.com/directory/) but that did not work.
     
  5. Oct 2, 2005 #4

    dduardo

    User Avatar
    Staff Emeritus

    Wait, so now you have server with php? Why don't you use that server?

    Huh? You can't just magically create subdomains. There is a little more work involved.
     
  6. Oct 2, 2005 #5

    no no.

    The server that I have space on does not have any Server side scripting. I have a server with a personal account on it that has PHP and CGI set up, but not the ability to host the site I am making due to the situation. The files being manipulated by the php script are larger and I do not want to take up the space on my personal account with them. so I figure I can host the php script on my personal account and have the files on the other server.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?