Results 1 to 8 of 8

Thread: Javascript Includes

  1. #1

    Thread Starter
    Addicted Member tonyenkiducx's Avatar
    Join Date
    Oct 2000
    Location
    London England
    Posts
    147
    Does anyone know if ASP code is executed when a .js extension file is called from html?

    It doesnt seem to, but theres no sodding way of checking.

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    Please explain further....
    Mark
    -------------------

  3. #3

    Thread Starter
    Addicted Member tonyenkiducx's Avatar
    Join Date
    Oct 2000
    Location
    London England
    Posts
    147
    Im calling a .js file from my HTML, but the .JS has asp in it. Now I know IIS5 is suppose to execute ASP code wherever it finds it, but it doesnt appear to be doing it.

    Any ideas?

  4. #4
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    I wasn't aware that "IIS5 is suppose to execute ASP code wherever it finds it"

    the .js file is only visible to the browser and is not being interpreted by the server
    Mark
    -------------------

  5. #5
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Could you just use a .asp extension for the javascript file and make sure it's included using "language=javascript type=text/javascript" in the tag?
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  6. #6

    Thread Starter
    Addicted Member tonyenkiducx's Avatar
    Join Date
    Oct 2000
    Location
    London England
    Posts
    147
    The server cant see the .js file??? Where does it come from then? I think youll find the web server controls all of the files that get sent out. Also IIS5 parses .html and even .cfm files to execute asp code. So I dont why .js should be any different, as it is is treated in the exact same way as a html file is(Check MIME settings under IIS5)

  7. #7
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    If you are including the .js file ads a client-side include then it stands to reason that the server won't read it
    Mark
    -------------------

  8. #8

    Thread Starter
    Addicted Member tonyenkiducx's Avatar
    Join Date
    Oct 2000
    Location
    London England
    Posts
    147
    Why not? What difference does it make? You have to go to the server and request the .js file in the same was as you would a .html or .asp file. Or maybe Im just being REALLY stupid. Are client side includes requested in a different manner?

Posting Permissions

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



Click Here to Expand Forum to Full Width