Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > <%@ Language="JAVASCRIPT" %> exists?

Reply
Thread Tools

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

 
 
John Davis
Guest
Posts: n/a
 
      08-26-2003
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




 
Reply With Quote
 
 
 
 
Martin CLAVREUIL
Guest
Posts: n/a
 
      08-26-2003
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.


 
Reply With Quote
 
 
 
 
John Davis
Guest
Posts: n/a
 
      08-26-2003
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" <(E-Mail Removed)> wrote in message
news:OD$(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
Aaron Bertrand - MVP
Guest
Posts: n/a
 
      08-26-2003
> 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


 
Reply With Quote
 
Ray at
Guest
Posts: n/a
 
      08-26-2003
I'm not Bob, but I will answer anyway.

"John Davis" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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


 
Reply With Quote
 
Bob Barrows
Guest
Posts: n/a
 
      08-26-2003
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


 
Reply With Quote
 
Bob Barrows
Guest
Posts: n/a
 
      08-27-2003
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments