473,657 Members | 2,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP scripting language query

Hello

Are the 3 script tags below all client-side javascript? If not, what are
they? If they are client-side javascript, why the different syntax (ie.
<SCRIPT>,
<SCRIPT LANGUAGE="JavaS cript1.2">, <SCRIPT LANGUAGE="JavaS cript">)?

Also, the syntax <%@ language=.... %> has been ommitted. Why is this, i
thought this was not allowed? Thanks

<SCRIPT>
function transform_url()
{
var suppress_host = false;

// an array to facilate searching of URL arguments
// callee wishes to preserve
var preserve = new Array;

// 'id' is a parameter we preserve by default
preserve['id'] = true;

// enumerate the array with arguments
for (i = 0; i < arguments.lengt h; i++)
{
if (arguments[i] == 'SuppressHost')
suppress_host = true;
else
preserve[arguments[i]] = true;
}

// start constructing new URL
newurl = new String;
with (location)
{
if (suppress_host)
newurl += pathname.substr (1);
else
newurl += protocol + '//' + hostname + pathname;
}

// process the URL parameters
// string the leading '?' character if it exists
var parameters = (location.searc h.substr(0, 1) == '?') ?
location.search .substr(1) : location.search ;
var params = parameters.spli t('&');
for (i = 0; i < params.length; i++)
{
nvpair = params[i].split('=');
if (nvpair.length >= 1) // check for valid name/value pair
{
if (preserve[nvpair[0]])
{
// append this parameter if callee
// specified it to be preserved
newurl += '_' + nvpair[0] + ((nvpair.length == 2) ? ('=' +
nvpair[1]) : '');
}
}
}

return newurl;
}

</SCRIPT>
<SCRIPT LANGUAGE="JavaS cript1.2">
<!--
var wtl_imgarray = new Array;
var wtl_ptr = 0;
function wtl_Tag6(wtl_Ta gID,wtl_SID,wtl _URL,wtl_Title, CONTENTGROUP)
{
function wtl_createImage (wtl_src)
{
if (document.image s)
{
wtl_imgarray[wtl_ptr] = new Image;
wtl_imgarray[wtl_ptr].src = wtl_src;
wtl_ptr++;
}
}
function D8( d)
{
var fwd=1, seed= new Date('01/01/2000'), key=
"0123456789ABCD EFGHIJKLMNOPQRS TUVWXYZabcdefgh ijklmnopqrstuvw xyz";
var s= key.charAt( d.getFullYear()-2000)+key.charA t(
d.getMonth()+1) +key.charAt( d.getDate());
s+= key.charAt( d.getHours())+k ey.charAt( d.getMinutes()) +key.charAt(
d.getSeconds()) ;
while( seed.getDay()!= fwd) seed= new Date(seed.getTi me() + 86400000);
var w= Math.floor( (d.getTime()-(seed.getTime() +86400000)) / 604800000 );
s+= key.charAt( (w-(w%16))/16 );
s+= key.charAt( w%16);
return s;
}
function A( B, C)
{
W+="&"+B+"="+es cape(C);
}
var t = new Date();
var
W="http"+(windo w.location.prot ocol.indexOf('h ttps:')==0?'s': '')+"://statse.webtrend slive.com/S"
+ wtl_SID + "/button6.asp?tag ver=" + wtl_TagVer + "&si=" + wtl_TagID + "&fw="
+ wtl_FWD;
A( "server", typeof(SERVER)= = "string" ? SERVER : "");
A( "order", typeof(ORDER)== "string" ? ORDER : "");
A( "Group", typeof(CONTENTG ROUP)== "string" ? CONTENTGROUP : "");
A( "invoice", typeof(INVOICE) == "string" ? INVOICE : "");
A( "cartview", typeof(CARTVIEW )== "string" ? CARTVIEW : "");
A( "cartadd", typeof(CARTADD) == "string" ? CARTADD : "");
A( "cartremove ", typeof(CARTREMO VE)== "string" ? CARTREMOVE : "");
A( "checkout", typeof(CHECKOUT )== "string" ? CHECKOUT : "");
A( "cartbuy", typeof(CARTBUY) == "string" ? CARTBUY : "");
A( "adcampaign ", typeof(ADCAMPAI GN)== "string" ? ADCAMPAIGN : "");
A( "tz", t.getTimezoneOf fset());
A( "ch", t.getHours());
A( "cl", D8(t));
A( "ti", wtl_Title);
A( "url", wtl_URL);
A( "rf", window.document .referrer);
A( "js", "Yes");
A( "ul", navigator.appNa me=="Netscape" ? navigator.langu age :
navigator.userL anguage);
if(typeof(scree n)=="object")
{
A( "sr", screen.width+"x "+screen.height );
A( "cd", screen.colorDep th);
A( "jo", navigator.javaE nabled() ? "Yes" : "No");
}
if( W.length>2048 && navigator.userA gent.indexOf('M SIE')>=0)
W= W.substring( 0, 2043)+"&tu=1";
wtl_createImage (W);
}
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaS cript">
<!--
var wtl_TagVer = 6;
var wtl_FWD = 0;
var wtl_url = transform_url(' vlnk','more','a ll');
var wtl_title = document.title;
var wtl_TagID = 139171;
var wtl_SID = "139171";
var ORDER= "";
var SERVER= "";
var CONTENTGROUP= "NS- Dataset, " +
transform_url(' SuppressHost',' vlnk','more','a ll');
var INVOICE= "";
var CARTVIEW= "";
var CARTADD= "";
var CARTREMOVE= "";
var CHECKOUT= "";
var CARTBUY= "";
var ADCAMPAIGN= "";
wtl_Tag6(wtl_Ta gID,wtl_SID,wtl _url,wtl_title, CONTENTGROUP);
//-->
</SCRIPT>
Jan 24 '06 #1
5 2006
> <SCRIPT>
function transform_url()
...
</SCRIPT>
That's client-side script. Language is unspecified, which is a pretty bad
practice.

<SCRIPT LANGUAGE="JavaS cript1.2">
That's specifiying the version of Javascript. If an old browser loads this,
it'll decide, "I don't know what 'Javascript1.2' is, so I'll just ignore
this."

<SCRIPT LANGUAGE="JavaS cript"> That's just specifying Javascript without worrying about the version.
Unless you're writing stuff that's only available in certain versions of
Javascript, this is generally fine to use, although the more encouraged way
of doing it is:

<script type="text/javascript">
</script>

The ommission of <%@ Language... thing. Well, that has nothing to do with
the CLIENT-SIDE javascript you asked about. But, as far as ommitting that,
that's fine to do, as the page will use the default language that's defined
in IIS, which is VBScript in a default configuration.

In the future, feel free to trim away the four hundred million lines and a
half of javascript when you're asking only about the <script> tags.

Ray at work

"Placek" <Pl****@discuss ions.microsoft. com> wrote in message
news:61******** *************** ***********@mic rosoft.com... Hello

Are the 3 script tags below all client-side javascript? If not, what are
they? If they are client-side javascript, why the different syntax
(ie.
<SCRIPT>,
<SCRIPT LANGUAGE="JavaS cript1.2">, <SCRIPT LANGUAGE="JavaS cript">)?

Also, the syntax <%@ language=.... %> has been ommitted. Why is this, i
thought this was not allowed? Thanks

<SCRIPT>
function transform_url()
...
</SCRIPT>
<SCRIPT LANGUAGE="JavaS cript1.2">

Jan 24 '06 #2
Ray

Appreciate your response.....wi ll chop away uneeded code next time. You
say ommitting <%@ language=.... %> defaults to vbscript.....do es this mean
the first script in my post is client-side vbscript?

Thansk

"Ray Costanzo [MVP]" wrote:
<SCRIPT>
function transform_url()
...
</SCRIPT>


That's client-side script. Language is unspecified, which is a pretty bad
practice.

<SCRIPT LANGUAGE="JavaS cript1.2">
That's specifiying the version of Javascript. If an old browser loads this,
it'll decide, "I don't know what 'Javascript1.2' is, so I'll just ignore
this."

<SCRIPT LANGUAGE="JavaS cript">

That's just specifying Javascript without worrying about the version.
Unless you're writing stuff that's only available in certain versions of
Javascript, this is generally fine to use, although the more encouraged way
of doing it is:

<script type="text/javascript">
</script>

The ommission of <%@ Language... thing. Well, that has nothing to do with
the CLIENT-SIDE javascript you asked about. But, as far as ommitting that,
that's fine to do, as the page will use the default language that's defined
in IIS, which is VBScript in a default configuration.

In the future, feel free to trim away the four hundred million lines and a
half of javascript when you're asking only about the <script> tags.

Ray at work

"Placek" <Pl****@discuss ions.microsoft. com> wrote in message
news:61******** *************** ***********@mic rosoft.com...
Hello

Are the 3 script tags below all client-side javascript? If not, what are
they? If they are client-side javascript, why the different syntax
(ie.
<SCRIPT>,
<SCRIPT LANGUAGE="JavaS cript1.2">, <SCRIPT LANGUAGE="JavaS cript">)?

Also, the syntax <%@ language=.... %> has been ommitted. Why is this, i
thought this was not allowed? Thanks

<SCRIPT>
function transform_url()
...
</SCRIPT>
<SCRIPT LANGUAGE="JavaS cript1.2">


Jan 24 '06 #3
Placek wrote:
Ray

Appreciate your response.....wi ll chop away uneeded code next time.
You say ommitting <%@ language=.... %> defaults to vbscript.....do es
this mean the first script in my post is client-side vbscript?


No. The <%@ tag applies to server-side code. Leaving out that tag means that
the language in server-side code will be expected to be vbscript (the
default unless a configuration setting is changed at the web site level
using IIS Mgr). The default for client-side code is typically javascript
unless otherwise specified.

Server-side code is enclosed in <% ... %> tags or contained in a
<script runat=server> ... </script> block. Anything else is client-side
code.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jan 24 '06 #4
Ray Costanzo [MVP] wrote:
<SCRIPT LANGUAGE="JavaS cript1.2">
That's specifiying the version of Javascript. If an old browser
loads this, it'll decide, "I don't know what 'Javascript1.2' is, so
I'll just ignore this."

<SCRIPT LANGUAGE="JavaS cript">

That's just specifying Javascript without worrying about the version.
Unless you're writing stuff that's only available in certain versions
of Javascript, this is generally fine to use, although the more
encouraged way of doing it is:


Interesting piece of trivia here, Ray.

When Netscape implemented Javascript 1.2, they introduced a nasty bug. The
equality operator would substitute for the assignment operator in
conditionals:

if (a=b) // treated like: if (a==b)

That bug was fixed in 1.3.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jan 24 '06 #5
Good Lord. You'd think that in testing a new version of a language, someone
may have used "if" once or twice. :]

Ray at work

"Dave Anderson" <GT**********@s pammotel.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
Interesting piece of trivia here, Ray.

When Netscape implemented Javascript 1.2, they introduced a nasty bug. The
equality operator would substitute for the assignment operator in
conditionals:

if (a=b) // treated like: if (a==b)

That bug was fixed in 1.3.

Jan 25 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3782
by: The_Incubator | last post by:
As the subject suggests, I am interested in using Python as a scripting language for a game that is primarily implemented in C++, and I am also interested in using generators in those scripts... Initially I was justing looking at using Python for some event scripting. So basically an event would trigger an object to run the appropriate Python script, which would be run in it's entirety and return control to the C++ code. After looking...
41
2785
by: Richard James | last post by:
Are we looking at the scripting world through Python colored glasses? Has Python development been sleeping while the world of scripting languages has passed us Pythonista's by? On Saturday Slashdot ran this article on the "best" scripting languages. http://developers.slashdot.org/developers/04/06/12/2125229.shtml?tid=126&tid=156 "Folks at the Scriptometer conducted a practical survey of which scripting language is the best. While...
33
2721
by: Quest Master | last post by:
I am interested in developing an application where the user has an ample amount of power to customize the application to their needs, and I feel this would best be accomplished if a scripting language was available. However, I want to code this application in Python, and I have not yet heard of an implementation of another scripting language into Python. An example of what I mean is this (an implementation of Lua into Ruby -- which I'd...
9
2280
by: Vijai Kalyan | last post by:
Hello All, I have a few questions which you might seem irrelavant and/or foolish. I am asking anyway so I can find out. 1. Is XSL as powerful as a programming language such as Java in its abilities to transform XML? The W3C site has the following definition on XSLT for example: "XSLT is designed for use as part of XSL, which is a stylesheet
19
1757
by: Shailesh Humbad | last post by:
Has anyone ever heard of a c++ web 'scripting' engine? I think it would be fairly easy to make one. All that is needed is an intermediary that compiles the code on demand and caches the executables. For example, I put a file like hello.cpp: #include <iostream> int main(void) { cout << "<h1>hello world</h1>"; }
3
1529
by: Michal O | last post by:
Hi. I have to write a C++ code that invokes a set of SQL statements (inserts, updates, selects etc.), according to the system administrator's directives. The directives should be written as a simple script. In addition to the SQL statements invocation, the script should enable using query results as an input to other SQL statements, and should be able to handle multiple query results.
6
7200
by: RM | last post by:
This is from the new KOffice Announcement. http://www.koffice.org/announcements/announce-1.5.php '''This version of KOffice features a start of a unified scripting solution called Kross. Kross provides cross-language support for scripting (thus its name) and at present supports Python and Ruby. Kross is easy to include into programs previously lacking scripting abilities, and is included in this version as a technology preview. So
4
1614
by: Gene Jones | last post by:
So I'm starting to do some things where I'm going to want to add scripting in the application, and I can't find a scripting language to plug in that I like. So far I've looked at LUA and L-Sharp, but neither appeals to me. TCL would be okay, I guess, but still not really ideal. My Googling hasn't turned up anything, so I figured I'd ask here: 1) Is there some way to make C# an embedded scripting language? (I doubt it, but it seems...
2
6494
by: JosAH | last post by:
Greetings, Introduction Java is not Javascript and most of the times when questions end up in the wrong forum, they're moved to the other forum as soon as possible. Accidentally this article talks about Javascript a bit but it belongs in the Java section. Since version 1.6 of Java a script engine comes packaged with the core classes. A script engine is an abstract little framework that offers support for other
3
2061
Banfa
by: Banfa | last post by:
The project I work on has a bespoke hardware platform which is designed to go into a variety of different situations. However to keep things simple we really want the software for the platform to remain the same in all cases (as good practice suggests). One of our thoughts is that to provide the final customisation required for each application we could embed a scripting language into the platform to allow any additional business logic to be...
0
8837
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8612
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7347
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6175
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4171
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2739
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.