bookmark - Asp And Java Scripts

Asp And Java Scripts

 
 Discussion by illusion with 1 Replies.
 Last Update: June 18, 2006, 1:12 pm
 
bookmark - Asp And Java Scripts  
    
free web hosting
 

QUOTE

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://www.webdeveloper.com/forum/showthre...?threadid=29056
szupie

Wed Nov 17, 2004    Reply    New Discussion   


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.

Sun Jun 18, 2006    Reply    New Discussion   

Quickly Post to Asp And Java Scripts  w/o signup Share Info about Asp And Java Scripts  using Facebook, Twitter etc. email your friend about Asp And Java Scripts Print
Reply / Comment Ask a Question? Share / Bookmark E-Mail a Friend Print

Asp And Asp.net   Asp And Asp.net (5) (13) Visual Web Developer 2005 Express Edition Beta 2 Visually create asp.net Web page  Visual Web Developer 2005 Express Edition Beta 2 Visually create asp.net Web page