By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,594 Members | 3,017 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,594 IT Pros & Developers. It's quick & easy.

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

P: n/a
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


Jul 19 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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.
Jul 19 '05 #2

P: n/a
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

"Bob Barrows" <re*******@yahoo.com> wrote in message
news:OD**************@TK2MSFTNGP12.phx.gbl...
John Davis wrote:
Just wonder if <%@ Language="JAVASCRIPT" %> exists??
Of course it does!

Since JavaScript is used in client-side scripting,


VBScript and Javascript can BOTH be used in client-side scripting,

provided the browser being used supports them. IE will support both (actually, IE
supports JScript which is slightly different from JavaScript). Other
browsers may not support client-side vbscript, so for internet development, client-side vbscript is usually avoided.
but <% ... %> is
used in server-side scripting.


Irrelevant
It sounds doesn't make sense. But I
saw that in a ASP test question before.

ASP is not a language: it is more of a platform on which several scripting
languages can be used, including both vbscript and javascript.

HTH,
Bob Barrows

Jul 19 '05 #3

P: n/a
> 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
Jul 19 '05 #4

P: n/a
I'm not Bob, but I will answer anyway.

"John Davis" <jr*******@hotmail.com> wrote in message
news:Ou**************@TK2MSFTNGP10.phx.gbl...
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
Jul 19 '05 #5

P: n/a
John Davis wrote:
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
Jul 19 '05 #6

P: n/a
Dave Anderson wrote:

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
Jul 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.