SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Can JS do this

  1. #1
    SitePoint Member
    Join Date
    May 2006
    0 Post(s)
    0 Thread(s)

    Can JS do this


    I would like to know if JS can do this :

    Scenario A:

    A user upload file from server A(testing server) to server B(life server).The upload scripts PHP,is it possible to use javascript to directly point to one directory i mean to the folder where the file is and strict the user from browsing other folder ?

    If is possible...please give me some hints on how to do it..


  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Sydney, NSW, Australia
    25 Post(s)
    1 Thread(s)
    Javascript can see the current web page that it is attached to, any other web pages from the same domain in other frames in the same window of the browser, a few read only fields that the browser provides access to and any cookies set by the current domain. It has no access whatever to anything else other than to pass information to a server side script via Ajax. Any information that Javascript gets access to via Ajax must be provided by the server side script.

    So to answer your question - NO.
    Stephen J Chapman, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts