Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Writing JavaScript in ASP classic [closed]

Is it possible (and how if so) to write JavaScript code directly into an ASP classic file?

I want to create validation functions inside an ASP classic file.

like image 688
Zephram Avatar asked Dec 26 '22 18:12

Zephram


1 Answers

ASP is a technology, NOT a language. You can write your ASP pages in any language which is registered as a Scripting Engine. So you can use VBScript, Javascript, Perl, ... if there is a scripting engine registered in your server, you can use it.

How? Like this!

<%@ Language= "Javascript" %> 
<% 
  var message = 'This is my message: ';
  for (var i = 0, endI = 10 ; i < endI ; i++){ 
      Response.Write( message + ' ' + i + '<br>' ) ;
  };
%> 
like image 135
MC ND Avatar answered Jan 12 '23 21:01

MC ND