Jump to content
xisto Community
Sign in to follow this  
illusion

Asp And Java Scripts

Recommended Posts

A direct relationship between the two is simply non-existant. Both technologies were developed by seperate companies which have relatively nothing to do with each other.

 

JavaScript, a product of Netscape, was developed to allow web programmers to write applications which could interact with web browsers. Whilst Active Server Pages, on the other hand, was developed to allow programmers to create data driven websites.

ASP, as the name implies, is a server-side technology. This fact alone forbids ASP from directly communicating with JavaScript.

Infact, an ASP script will be completely executed and forgotten about by the time the page is even downloaded and displayed on the users screen.

 

When a user requests a page, say 'category.asp', the browser will request the page from the server. Once the page has been located, the source code will be processed on the server and, if necessary, HTML code will be output and displayed to the user. With that said, it should now sound completely illogical to assign a JS variable to an ASP script without first sending the data to the server for processing.

 

I am aware of the indirect ways which ASP can influence Javascript. Such as; setting Javascript variables from the server. The following is a simple example:

 

 

 

code:--------------------------------------------------------------------------------

<%

dim x

x = 2

 

response.write("<script>var x = " & x & ";</script>")

%>

--------------------------------------------------------------------------------

 

 

The preceding ASP script simply defines a variable named 'x' and then prints its value to the output. This method actually doesnt show any evidence of ASP and JavaScript communicating.

 

Some people will say "But you can use JavaScript to write ASP scripts". This actually isnt true. You can use a spawn of JS call JScript. JScript was also developed by Microsoft and is used for both client side and server side scripting. When using JScript in an ASP application, you would not refer to it as JS, but as ASP, none the less


-----Copied without quotes from http://forums.xisto.com/no_longer_exists/ -----szupie

Edited by szupie (see edit history)

Share this post


Link to post
Share on other sites

No offense but doesn't ASP mean acitve server pages? If you used JavaScript to connect to a DB and display records on a web page then basically that it what it is, an active server page.Just my option.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.