<%@ Language="JAVASCRIPT" %> exists?

J

John Davis

Just wonder if <%@ Language="JAVASCRIPT" %> exists??

Since JavaScript is used in client-side scripting, but <% ... %> is used in
server-side scripting. It sounds doesn't make sense. But I saw that in a ASP
test question before.


The question is like this:
How can you script your ASP code in JavaScript?
The answer is: <%@ Language="JAVASCRIPT" %>


please advice. Thanks!
John
 
M

Martin CLAVREUIL

hi,

you can use jscript (ms implementation of javascript) server side.
just have to define it in the global asa as you did and in the site
properties as default server side scripting language.
 
J

John Davis

Bob,

In internet development, can i conclude....

In client-side scripting, we can use JavaScript or VBScript, but JavaScript
is a better choice.
In server-side ASP scripting, we can use VBScript or JScript (server-side
JavaScript??), but VBScript is a better choice

John
 
A

Aaron Bertrand - MVP

In client-side scripting, we can use JavaScript or VBScript, but
JavaScript
is a better choice.

JavaScript is essentially the only choice, unless you want to limit your
audience to Internet Explorer (no other mainstream browsers support
client-side VBScript).
In server-side ASP scripting, we can use VBScript or JScript (server-side
JavaScript??), but VBScript is a better choice

I don't believe there is a universally better choice. This is more like
Pepsi vs. Coke. See http://www.aspfaq.com/2176
 
R

Ray at

I'm not Bob, but I will answer anyway.

John Davis said:
Bob,

In internet development, can i conclude....

In client-side scripting, we can use JavaScript or VBScript, but JavaScript
is a better choice.
Yes

In server-side ASP scripting, we can use VBScript or JScript (server-side
JavaScript??), but VBScript is a better choice

This is personal preference. There are pros and cons to both VB Script and
JScript.

Ray at work
 
B

Bob Barrows

John said:
Bob,

In internet development, can i conclude....

In client-side scripting, we can use JavaScript or VBScript, but
JavaScript is a better choice.

Essentially, yes. In my intranet apps, where the client is ALWAYS using IE,
I use vbscript almost exclusively because I'm more familiar with it. If I
was writing internet apps, I would take the trouble to familiarize myself
with javascript.
In server-side ASP scripting, we can use VBScript or JScript
(server-side JavaScript??), but VBScript is a better choice
There is no "better choice". Both are "equally" supported. It's all in what
you're familiar with. For example, the javascript array object has some very
useful methods and properties that are not provided by vbscript arrays.
However, vbscript has multi-dimensional arrays, which many of us use quite
often, and which are not available in javascript. So there are trade-offs.
It's up to you.

Bob Barrows
 
B

Bob Barrows

Dave said:
I have long felt that it is short-sighted to write for only one
browser. It certainly isn't difficult to write to commonly
implemented standards. This episode vindicated my persistence in
pressing team standards for browser compatibility in our web apps.
And yes, I have had to fight the "but we control the desktop"
argument all the way.
Thanks. Good food for thought.

Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top