Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback: irt.org FAQ Knowledge Base Q1041

Feedback on: irt.org FAQ Knowledge Base Q1041

Sent by John on March 07, 2002 at 08:00:26: - feedback #3661

Worth:
Worth reading

Length:
Just right

Technical:
Just right

Comments:
You are always assuming you are calling a file that contains static js. You can call an asp, php, jsp, cfm page as long as it returns valid js. In this case you would want to pass parameters in the SRC url.


Sent by Bill Wilkinson on May 14, 2002 at 18:16:27: - feedback #3860

Worth:
Worth reading

Length:
Too short

Technical:
Not technical enough

Comments:
The author of this answer has not considered the possibility that a given server might be using some server-side methodology to supply the JavaScript source, instead of simply passing back a static file!

For example, I could ask my server to process ".js" files as if they were ".asp" files. And then the query string passed to the .js is sent to the ASP engine and could be used to deliver dynamic content (in the form of JavaScript, of course)!

In point of fact, I do this all the time. Admittedly, I don't bother to continue to use the ".js" extension. I typically do something like:
<SCRIPT Language="JavaScript" Src="getWhatever.asp?x=17&y=bananas"></SCRIPT>

But I can't see any reason that I couldn't point the .js files to the .asp processor and thus achieve dynamic results. (And, of course, this would apply to any other server side process! You could use CGI, PHP, JSP, whatever.)




©2018 Martin Webb