Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. Javascript ASP problem

Javascript ASP problem

Scheduled Pinned Locked Moved Web Development
javascriptdata-structureshelpquestion
5 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mjay2004
    wrote on last edited by
    #1

    I need to populate this javascript using asp this is my code var ImageList = new Array( // Name, URL ["fhfg" , "logo.jpg"], ["Logo 2 Over", "logo_over.jpg"] ); Its in a .js file is there any way to input asp code in a js file? or something like that.

    C C G M 4 Replies Last reply
    0
    • M mjay2004

      I need to populate this javascript using asp this is my code var ImageList = new Array( // Name, URL ["fhfg" , "logo.jpg"], ["Logo 2 Over", "logo_over.jpg"] ); Its in a .js file is there any way to input asp code in a js file? or something like that.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      A js file just gets included, doesn't it ? You may need to generate this script in your asp file, I'm not sure. Christian Graus - Microsoft MVP - C++

      1 Reply Last reply
      0
      • M mjay2004

        I need to populate this javascript using asp this is my code var ImageList = new Array( // Name, URL ["fhfg" , "logo.jpg"], ["Logo 2 Over", "logo_over.jpg"] ); Its in a .js file is there any way to input asp code in a js file? or something like that.

        C Offline
        C Offline
        Curtis Schlak
        wrote on last edited by
        #3

        I can think of two ways to do this, though neither of them are pretty. 1. Have ASP handle your .js files; or, 2. Have ASP generate your .js files on-the-fly. The easiest way, as the other poster mentioned, is for you to just generate the array in your Web page. "we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty

        1 Reply Last reply
        0
        • M mjay2004

          I need to populate this javascript using asp this is my code var ImageList = new Array( // Name, URL ["fhfg" , "logo.jpg"], ["Logo 2 Over", "logo_over.jpg"] ); Its in a .js file is there any way to input asp code in a js file? or something like that.

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          You can put asp code in the file if you change the extension to asp. Javascript files are cached differently than pages though, so in most cases the code will only be run the first time a user gets the file, after that the file will be fetched from the cache instead. --- b { font-weight: normal; }

          1 Reply Last reply
          0
          • M mjay2004

            I need to populate this javascript using asp this is my code var ImageList = new Array( // Name, URL ["fhfg" , "logo.jpg"], ["Logo 2 Over", "logo_over.jpg"] ); Its in a .js file is there any way to input asp code in a js file? or something like that.

            M Offline
            M Offline
            mjay2004
            wrote on last edited by
            #5

            Thanks for the help I got rid of the js file and just embedded the javascript into my asp page in the end and it works great.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups