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

JScript and VBscript

P: n/a
If I have a .ASP page that runs JScript code - is it possible to include an
..ASP page that runs VBscript???
Jul 19 '05 #1
Share this Question
Share on Google+
29 Replies


P: n/a
no, you can't mix two languages the way you're asking.
you could convert one into a WSC and use that, or you could use <script
runat="server"> rather than ASP delimiters...

________________________________________
Atrax. MVP, IIS
http://rtfm.atrax.co.uk/

newsflash : Atrax.Richedit 1.0 now released.
http://rtfm.atrax.co.uk/infinitemonk...trax.RichEdit/

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #2

P: n/a
Thanks ;)

"Atrax" <at***@dontspamatrax.co.uk> skrev i melding
news:Ov**************@tk2msftngp13.phx.gbl...
no, you can't mix two languages the way you're asking.
you could convert one into a WSC and use that, or you could use <script
runat="server"> rather than ASP delimiters...

________________________________________
Atrax. MVP, IIS
http://rtfm.atrax.co.uk/

newsflash : Atrax.Richedit 1.0 now released.
http://rtfm.atrax.co.uk/infinitemonk...trax.RichEdit/

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #3

P: n/a
"Atrax" wrote:

you could convert one into a WSC and use that, or you could use
<script runat="server"> rather than ASP delimiters...


Server.Execute() is also available...
--
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.
Jul 19 '05 #4

P: n/a
Be aware of the execution order:
1.. Script in <SCRIPT> elements in nondefault languages
2.. Inline script
3.. Script in <SCRIPT> elements in the default language
--
Roland

This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.
Jul 19 '05 #5

P: n/a
"Roland Hall" wrote:

Be aware of the execution order...


Curiously enough, this can be "circumvented". A function (or Function or
Sub) can be called from any block regardless of which one defines it -- and
regardless of the "execution order".

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

P: n/a
help & support, searching for information stored on this
computor,recieving genetic failure.
-----Original Message-----
If I have a .ASP page that runs JScript code - is it possible to include an..ASP page that runs VBscript???
.

Jul 19 '05 #7

P: n/a
help & support,searching for information on this
computor,recieving genetic failure
-----Original Message-----
If I have a .ASP page that runs JScript code - is it possible to include an..ASP page that runs VBscript???
.

Jul 19 '05 #8

P: n/a
an*******@discussions.microsoft.com wrote:
help & support, searching for information stored on this
computor,recieving genetic failure.


Yes! It's obvious a mutation has occurred ...

Bob
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #9

P: n/a
an*******@discussions.microsoft.com wrote:
help & support,searching for information on this
computor,recieving genetic failure


The mutation is spreading! Quick, someone call the CDC! ;-)
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #10

P: n/a
Only limitation is that you can't pass a querystring to Server.Execute().
"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
"Atrax" wrote:

you could convert one into a WSC and use that, or you could use
<script runat="server"> rather than ASP delimiters...
Server.Execute() is also available...
--
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.

Jul 19 '05 #11

P: n/a
"Mike Florio" wrote:

Only limitation is that you can't pass a querystring to
Server.Execute().


I'd say there are a few more. The calling script shares no variables or
functions with the one being executed, for example.
--
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.
Jul 19 '05 #12

P: n/a
"Dave Anderson" wrote:
"Roland Hall" wrote:
Be aware of the execution order...
Curiously enough, this can be "circumvented". A function (or Function or
Sub) can be called from any block regardless of which one defines it --

and regardless of the "execution order".


Ok but wouldn't that require having knowledge of the order of execution?

--
Roland

This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.

Jul 19 '05 #13

P: n/a

"Bob Barrows" wrote:
an*******@discussions.microsoft.com wrote:
help & support, searching for information stored on this
computor,recieving genetic failure.


Yes! It's obvious a mutation has occurred ...


You crack me up! (O:=
Jul 19 '05 #14

P: n/a
> Ok but wouldn't that require having knowledge of the order of execution?

No. Put the code in the different language into subroutines or functions
(not inline). Then call those functions in the desired order from inline
code in whichever language that you want to be "dominant".

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Roland Hall" <nobody@nowhere> wrote in message
news:uN**************@TK2MSFTNGP11.phx.gbl...
"Dave Anderson" wrote:
"Roland Hall" wrote:
Be aware of the execution order...


Curiously enough, this can be "circumvented". A function (or Function or
Sub) can be called from any block regardless of which one defines it --

and
regardless of the "execution order".


Ok but wouldn't that require having knowledge of the order of execution?

--
Roland

This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.

Jul 19 '05 #15

P: n/a
"Mark Schupp" wrote:
Ok but wouldn't that require having knowledge of the order of execution?


No. Put the code in the different language into subroutines or functions
(not inline). Then call those functions in the desired order from inline
code in whichever language that you want to be "dominant".


Correct. Without knowing the order of execution and not doing it as you
suggested means you could get into trouble, which is my whole point!

I prefer this answer: http://www.aspfaq.com/show.asp?id=2045 - It is better
not to mix inline code with script blocks runat=server but should you have
to, knowing the order of execution is better than not knowing.

Mixed-language script blocks not in subs/functions. They get executed out
of the order they were placed on the page.
http://kiddanger.com/lab/langorder.asp

<%@ Language=VBScript %>
<% Option Explicit %>
<script type="text/vbscript" language="vbscript" runat=server>
Response.Write("one <br />")
</script>
<script type="text/javascript" language="javascript" runat=server>
Response.Write("two <br />")
</script>
<%
Response.Write("three <br />")
%>
<script type="text/javascript" language="javascript" runat=server>
Response.Write("four <br />")
</script>
<script type="text/vbscript" language="vbscript" runat=server>
Response.Write("five <br />")
</script>

Mixed-language script blocks in subs/functions called from inline script.
They get executed in the order called from inline script.
http://kiddanger.com/lab/langorder2.asp

<%@ Language=VBScript %>
<% Option Explicit %>
<script type="text/vbscript" language="vbscript" runat=server>
sub vb1()
Response.Write("one <br />")
end sub
</script>
<script type="text/javascript" language="javascript" runat=server>
function js2() {
Response.Write("two <br />")
}
</script>
<%
vb1
js2
Response.Write("three <br />")
js4
vb5
%>
<script type="text/javascript" language="javascript" runat=server>
function js4() {
Response.Write("four <br />")
}
</script>
<script type="text/vbscript" language="vbscript" runat=server>
sub vb5()
Response.Write("five <br />")
end sub
</script>

Ridiculous example:

Default language VBScript, calling a JScript script block which calls a
VBScript script inline function and writes the result from inline vbscript.
If the ?n=# where # = a decimal number is not present, an error is called
from vbscript inline script to a vbscript script block sub to display an
error and syntax.

http://kiddanger.com/lab/langorder3.asp
http://kiddanger.com/lab/langorder3.asp?n=65535

<%@ Language=VBScript %>
<% Option Explicit %>
<script type="text/jscript" language="jscript" runat=server>
function jsHex(jsn) {
return vbHex(jsn);
}
</script>
<script type"text/vbscript" language="vbscript" runat=server>
sub showError()
Response.Write("<div style=""border: 1px solid black""><div
style=""border-bottom: 1px solid black; padding-right: 2px;
background-color: #ffe0e0""><span style=""color: white; background-color:
red; border-right: 1px solid black"">Error!</span> Value expected.</div>" &
vbCrLf & _
"syntax: http://kiddanger.com/lab/langorder3.asp?n=" &
server.HTMLEncode("<a decimal number>") & "<br />" & vbCrLf & _
"Ex. http://kiddanger.com/lab/langorder3.asp?n=546</div>")
end sub
</script>
<%
function vbHex(vbn)
vbHex = Hex(vbn)
end function

dim n
n = Request.QueryString("n")
if n = "" then
showError
else
Response.Write("Decimal: " & n & " = Hex: " & jsHex(n) & "<br />")
end if
%>

IMHO, not informing someone of the order of execution is ridiculous. That
was my whole point. I know it's possible to make it work but not knowing
could cause problems.

--

Roland

This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.
Jul 19 '05 #16

P: n/a
Thanks - didn't know that.

"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:eE**************@TK2MSFTNGP10.phx.gbl...
"Mike Florio" wrote:

Only limitation is that you can't pass a querystring to
Server.Execute().
I'd say there are a few more. The calling script shares no variables or
functions with the one being executed, for example.
--
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.

Jul 19 '05 #17

P: n/a
"Roland Hall" wrote:

Ok but wouldn't that require having knowledge of the order of execution?
No. Put the code in the different language into subroutines or functions
(not inline). Then call those functions in the desired order from inline
code in whichever language that you want to be "dominant".


Correct. Without knowing the order of execution and not doing it as you
suggested means you could get into trouble, which is my whole point!


And your point is wrong. If you follow Mark's advice, you CANNOT get in
trouble, regardless of whether you know the order of execution or not.

...IMHO, not informing someone of the order of execution is ridiculous.
That was my whole point.
Which one was your whole point -- that it is ridiculous or that it could
lead to trouble?

I know it's possible to make it work but not knowing could cause problems.


Likewise with not knowing anything else about the technology you are working
with. What's your point (whole or otherwise)?
--
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.
Jul 19 '05 #18

P: n/a
"Dave Anderson" wrote:
And your point is wrong. If you follow Mark's advice, you CANNOT get in
trouble, regardless of whether you know the order of execution or not.


If you do not know there is an execution order and you DO NOT put all
non-default language script in subroutines called from inline script then
you can get in trouble. How difficult is that for you to understand? Mark
obviously knows about the execution order and thus uses this coding
methodology. Where is the crime in letting others know WHY you should try
to do it the way Mark suggested? I know you prefer the "Dave Anderson, Just
Follow Me Blindly Method" but where is the education in that? Your
methodology doesn't work.

301 Error.
Dave's Response: Problem with your keyboard, go into the BIOS setup and
disable checking for the keyboard. You'll never experience this error
again. Don't ask questions. This is a need to know basis and I don't think
you need to know. You'll never need to know why if you just do as I say.

User replaces keyboard and still experiences same error. Perhaps it's not
plugged in? Educating the user in this case might be beneficial?! Perhaps
the color-coded ps/2 ports, the mouse and keyboard are plugged into, might
be reversed?! Or maybe the user's keyboard is wireless and the batteries
are dead?!

Educating someone as to WHY something should try to be done a certain way to
avoid possible errors is a good thing. Not educating someone as to WHY and
the possible errors that could occur is just plain dumb. If Aaron has a FAQ
re: this issue, perhaps there are a lot of people that need some education
regarding issues with the execution order of mixed-language server-side
script blocks with inline script and how to avoid them?!

--
Roland

This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.
Jul 19 '05 #19

P: n/a
"Roland Hall" wrote:

If you do not know there is an execution order and you DO NOT
put all non-default language script in subroutines called from
inline script then you can get in trouble.
Define trouble.

I think anyone with rudimentary troubleshooting skills can mix languages in
ASP without "getting in trouble". I would further suggest that someone
willing to use two languages is already savvy enough to explore the inherent
issues to a point of reasonable understanding.

But more to the point, order of execution is just SOMETHING TO KNOW about
ASP. If you create an instance of something with VBScript and don't know
that you're supposed to later set the variable reference to Nothing, you can
get in trouble. If you put objects into session or application variables,
you can get in trouble, whether you know it or not. If you don't understand
the difference between an object and its default property, you can get in
trouble.

BFD. Mixing scripting languages doesn't have to be intuitive, it merely
should be documented. And it is:
http://msdn.microsoft.com/library/de..._vbnjscrpt.asp
[Incoherent "Dave Anderson, Just Follow Me Blindly Method" rant snipped]
If Aaron has a FAQ re: this issue, perhaps there are a lot of
people that need some education regarding issues with the
execution order of mixed-language server-side script blocks
with inline script and how to avoid them?!


My point is that people should understand the technology they are using, and
the existence of the FAQ is not inconsistent with that or anything else I
have said in this thread.
--
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.
Jul 19 '05 #20

P: n/a
"Dave Anderson" wrote:
"Roland Hall" wrote:

If you do not know there is an execution order and you DO NOT
put all non-default language script in subroutines called from
inline script then you can get in trouble.
Define trouble.

Code not executing in the order you wanted it to?
I think anyone with rudimentary troubleshooting skills can mix languages in ASP without "getting in trouble". I would further suggest that someone
willing to use two languages is already savvy enough to explore the inherent issues to a point of reasonable understanding. One does not define the other however, you did say 'suggest.' Using two
languages does not prove you know them. Also, knowing the two languages, in
this case JScript/Javascript and VBScript does not mean you understand the
order of execution of the ASP processor.
But more to the point, order of execution is just SOMETHING TO KNOW about
ASP. That's all I have been saying. It is better to know than not know. From
now on, I'm drawing pictures. (O:=
If you create an instance of something with VBScript and don't know
that you're supposed to later set the variable reference to Nothing, you can get in trouble. Define trouble. (O:=
The same is true if you don't wear a condom.
If you put objects into session or application variables,
you can get in trouble, Define trouble. (O:=
The same is true if you don't call her the next day.
whether you know it or not. n/a
If you don't understand
the difference between an object and its default property, you can get in
trouble. Define trouble. (O:=
The same is true if you don't know the difference between your *ss and a
hole in the ground.
BFD. It could be.
Mixing scripting languages doesn't have to be intuitive, it merely
should be documented. The Bible has been around for many years but how many cannot recite the 10
commandments?
There is a lot of documentation out there you and I have not read. Just
because it is documented doesn't mean it is known by the person trying to
implement it. None of my ASP books actually reference the execution order,
AFAIK. I read a post in here long ago and found out that way. I don't use
runat=server so I have never experienced this issue but it was by chance,
not by knowledge, even though it has been documented since 1998.
And it is:
http://msdn.microsoft.com/library/de..._vbnjscrpt.asp
Perhaps Microsoft thought it was necessary for people to KNOW?!
My point is that people should understand the technology they are using, I agree but you cannot know everything. This NG demonstrates that even the
most seasoned developer sometimes has to ask for help.
and
the existence of the FAQ is not inconsistent with that or anything else I
have said in this thread.

It's not just a river in Egypt anymore. (O:=

--
Roland

This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.

-Technet Script Center-
http://www.microsoft.com/technet/tre...er/default.asp
-MSDN Library-
http://msdn.microsoft.com/library/default.asp
Jul 19 '05 #21

P: n/a
"Roland Hall" "wrote":

Define trouble. Code not executing in the order you wanted it to?


That can happen in many programming scenarios. This "order of execution"
setting is not unique in that regard.

Using two languages does not prove you know them.
Yawn. My point remains. If you're willing to use a tool without knowing what
it does, that's your problem. If you can't spend a little time learning
about the technology you're using, then I certainly have little sympathy for
you when things turn out unexpectedly.

In my opinion, a programmer without curiousity is a drone.

That's all I have been saying. It is better to know than not know.


That's NOT all you have been saying. You started by questioning my assertion
that execution order can be rendered moot with a simple approach. Remember
this?

DAVE: Curiously enough, this can be "circumvented". A
function (or Function or Sub) can be called from
any block regardless of which one defines it --
and regardless of the "execution order".

ROLAND: Ok but wouldn't that require having knowledge
of the order of execution?

MARK SCHUPP: No.

I outlined a means by which you can eliminate the entire issue of execution
order, and by which virtually all of the potential shortcomings of mixed
languages could be solved. You didn't bother to test my assertion before
throwing out a "rebuttal"**. Doing so would have saved us all the rest of
this conversation.
**In this case, a "Yeah-buttal", and a weak one at that. I *did* phrase it
quite unambiguously. What do you suppose I meant by [regardless of the
"execution order"]?

Mixing scripting languages doesn't have to be intuitive, it
merely should be documented.


The Bible has been around for many years but how many cannot
recite the 10 commandments?


Please cease the non sequitur barrage.
--
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.
Jul 19 '05 #22

P: n/a
> you can get in trouble. How difficult is that for you to understand?
Mark
obviously knows about the execution order and thus uses this coding
methodology. Where is the crime in letting others know WHY you should try
Actually I don't know the actual execution order and I don't care. Always
TELL the computer what YOU want it to do, never hope that things will just
work out.

It should be simple enough to determine the actual execution order by
experimentation (documentation is not always correct anyway). Probably could
have been done in 10% of the time spent on this discussion thread.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Roland Hall" <nobody@nowhere> wrote in message
news:ee**************@TK2MSFTNGP10.phx.gbl... "Dave Anderson" wrote:
And your point is wrong. If you follow Mark's advice, you CANNOT get in
trouble, regardless of whether you know the order of execution or not.
If you do not know there is an execution order and you DO NOT put all
non-default language script in subroutines called from inline script then
you can get in trouble. How difficult is that for you to understand?

Mark obviously knows about the execution order and thus uses this coding
methodology. Where is the crime in letting others know WHY you should try
to do it the way Mark suggested? I know you prefer the "Dave Anderson, Just Follow Me Blindly Method" but where is the education in that? Your
methodology doesn't work.

301 Error.
Dave's Response: Problem with your keyboard, go into the BIOS setup and
disable checking for the keyboard. You'll never experience this error
again. Don't ask questions. This is a need to know basis and I don't think you need to know. You'll never need to know why if you just do as I say.

User replaces keyboard and still experiences same error. Perhaps it's not
plugged in? Educating the user in this case might be beneficial?! Perhaps the color-coded ps/2 ports, the mouse and keyboard are plugged into, might
be reversed?! Or maybe the user's keyboard is wireless and the batteries
are dead?!

Educating someone as to WHY something should try to be done a certain way to avoid possible errors is a good thing. Not educating someone as to WHY and the possible errors that could occur is just plain dumb. If Aaron has a FAQ re: this issue, perhaps there are a lot of people that need some education
regarding issues with the execution order of mixed-language server-side
script blocks with inline script and how to avoid them?!

--
Roland

This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.

Jul 19 '05 #23

P: n/a
"Mark Schupp" wrote:
you can get in trouble. How difficult is that for you to understand? Mark
obviously knows about the execution order and thus uses this coding
methodology. Where is the crime in letting others know WHY you should

try
Actually I don't know the actual execution order Since it was in my first post in this thread, that is a false statement.
and I don't care. Always
TELL the computer what YOU want it to do, never hope that things will just
work out. Telling the computer runat=server in the default lang. before the
non-default lang. will not work because the ASP processor has its own
execution order so it must be in a sub/function and called from inline
script to avoid issues.
It should be simple enough to determine the actual execution order by
experimentation (documentation is not always correct anyway).

Ah! Ok. Words of wisdom. Well, then why ask questions in a NG if
experimentation will make you all-knowing...and forget about the docs,
they're unreliable.

Order of execution is important even on the client-side and not everyone is
a seasoned developer. It's BS to tell someone, "Just keep pluggin' away,
you'll get it and forget about the docs, they're unreliable."

Ex.
This doesn't work - mismatch error

<SCRIPT LANGUAGE="VBScript">
function doubledNumber(aNumber)
doubledNumber = doubleMe(aNumber)
end function
document.write("The answer is " & doubledNumber("2"))
</SCRIPT>

<SCRIPT LANGUAGE="JScript">
function doubleMe(aNumber){
return aNumber * 2;
}
</SCRIPT>

Change the order of the script blocks and it works:

<SCRIPT LANGUAGE="JScript">
function doubleMe(aNumber){
return aNumber * 2;
}
</SCRIPT>
<SCRIPT LANGUAGE="VBScript">
function doubledNumber(aNumber)
doubledNumber = doubleMe(aNumber)
end function
document.write("The answer is " & doubledNumber("2"))
</SCRIPT>

It's modified a bit but not much. It's from some documentation from
Microsoft. It must be unreliable.

http://msdn.microsoft.com/library/en...rpt_servscript

--
Roland

This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.

-Technet Script Center-
http://www.microsoft.com/technet/tre...er/default.asp
-MSDN Library-
http://msdn.microsoft.com/library/default.asp
Jul 19 '05 #24

P: n/a
"Roland Hall" "wrote":

This doesn't work - mismatch error

[client-side example]
That's irrelevant. This is an ASP forum, and the discussion has focused on
the behavior of asp.dll, not on that of a client-side browser. I note that
your code generates no errors for the following browsers (vacuously, of
course):

Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.5) Gecko/20031007
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2) Opera 7.11 [en]

In any case, it's unreasonable to assume you know the implemetation of
scripting support for every version of every browser. We *do* know and have
reasonable expectation of continued support for the behavior of asp.dll, and
that is the only thing that matters in here.

Change the order of the script blocks and it works:
Same fallacy...
It's modified a bit but not much. It's from some documentation
from Microsoft. It must be unreliable.


Cute. You quote an article titled "Using VBScript and JScript on a Web
Page", which specifically warns that this example ill not work. Rather than
show mixed scripting behavior to be "unreliable", you provide the evidence
that the documentation is correct for both the asp.dll behavior and for
Internet Explorer's client-side behavior.

Offering evidence that your argument is wrong is perhaps not the textbook
way of persuading people, but it *does* have the attraction of novelty.

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

P: n/a
You know what Dave, you exhaust me. I just deleted all my responses because
it's a dead horse and you obviously have an agenda. So, Happy New Year.

--
Roland

This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.

-Technet Script Center-
http://www.microsoft.com/technet/tre...er/default.asp
-MSDN Library-
http://msdn.microsoft.com/library/default.asp
Jul 19 '05 #26

P: n/a
Dave Anderson wrote:
"Roland Hall" wrote:
Be aware of the execution order...


Curiously enough, this can be "circumvented". A function (or Function or
Sub) can be called from any block regardless of which one defines it -- and
regardless of the "execution order".


[posted after Roland became "exhausted"]

The above is a good methodology to follow to prevent confusion. However...

If one were given working code already in production and written by
developer(s) who freely mixed code in different languages without doing
what you describe above, then it would be _necessary_ to be aware of the
subtleties of execution order. Were one to encounter such code a good
first step would be to refresh one's memory on execution order and then
_possibly_ set about refactoring the code in the manner you describe
above. I say "possibly" because there's _always_ a cost and some danger
in modifying working code!

[Meta-observation about this thread:]
This was a very interesting thread for me because I hadn't revisited the
topic in some time and also because of the delightful fact that _all_
parties were presenting correct information and and useful examples but
nonetheless were arguing. For that reason I'm glad that they persisted
even though they seemed somewhat puzzled by each other's posts.

I think Dave's post (above) marks a point whereafter the thread becomes
inadvertently contentious. As the topic unfolds, Roland, Dave and Mark
present useful and interesting information and examples. Had all three
been in the same room discussing the question, any differences would
have been quickly resolved, assumptions more clearly laid out and
misunderstanding more easily avoided. But those of us not in that same
room would never have heard the discussion and would have remained less
enlightened. So thank you!
[End Meta-observation]

Good Luck and Happy New Year to all,
Michael D. Kersey

Programmer's Threat(accompanied by musical theme from "The Good, The
Bad, and the Ugly"): "Touch that code and you own it!"

Jul 19 '05 #27

P: n/a
"Michael D. Kersey" wrote:

If one were given working code already in production and
written by developer(s) who freely mixed code in different
languages without doing what you describe above, then it
would be _necessary_ to be aware of the subtleties of
execution order.


If you are suggesting that it would be necessary to be aware of those
subtleties beforehand, I'm not sure I agree, but you do underscore my point
that we should understand the technology we use.

Were I in such a situation, my A PRIORI analysis would almost certainly
alert me to the fact that such subtleties exist, and I would either search
for documentation or test my assumptions to reach clarity on the issue.

In any case, I agree that such awareness necessarily must precede the work.
--
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.
Jul 19 '05 #28

P: n/a
"Michael D. Kersey" wrote:
: Dave Anderson wrote:
: > "Roland Hall" wrote:
: >
: >>Be aware of the execution order...
: >
: > Curiously enough, this can be "circumvented". A function (or Function or
: > Sub) can be called from any block regardless of which one defines it --
and
: > regardless of the "execution order".
:
: [posted after Roland became "exhausted"]
:
: The above is a good methodology to follow to prevent confusion. However...
:
: If one were given working code already in production and written by
: developer(s) who freely mixed code in different languages without doing
: what you describe above, then it would be _necessary_ to be aware of the
: subtleties of execution order. Were one to encounter such code a good
: first step would be to refresh one's memory on execution order and then
: _possibly_ set about refactoring the code in the manner you describe
: above. I say "possibly" because there's _always_ a cost and some danger
: in modifying working code!
:
: [Meta-observation about this thread:]
: This was a very interesting thread for me because I hadn't revisited the
: topic in some time and also because of the delightful fact that _all_
: parties were presenting correct information and and useful examples but
: nonetheless were arguing. For that reason I'm glad that they persisted
: even though they seemed somewhat puzzled by each other's posts.
:
: I think Dave's post (above) marks a point whereafter the thread becomes
: inadvertently contentious. As the topic unfolds, Roland, Dave and Mark
: present useful and interesting information and examples. Had all three
: been in the same room discussing the question, any differences would
: have been quickly resolved, assumptions more clearly laid out and
: misunderstanding more easily avoided. But those of us not in that same
: room would never have heard the discussion and would have remained less
: enlightened. So thank you!
: [End Meta-observation]
:
: Good Luck and Happy New Year to all,
: Michael D. Kersey
:
: Programmer's Threat(accompanied by musical theme from "The Good, The
: Bad, and the Ugly"): "Touch that code and you own it!"

Hi Michael...

Good observation. I think we actually agreed more than we disagreed. Dave
thinks it is good to 'know the code you are developing in' and I think
informing someone of how something works is part of that. That sounds the
same to me but what do I know?

Had we been in the same room, perhaps it would have been more academic and
more evident or perhaps more adjectives would have been used?! So,
whichever your perspective, Dave is wrong! *roar* ...runs out laughing...
Happy New Year!

--
Roland

This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.

-Technet Script Center-
http://www.microsoft.com/technet/tre...er/default.asp
-MSDN Library-
http://msdn.microsoft.com/library/default.asp

Jul 19 '05 #29

P: n/a
"Roland Hall" wrote:

...whichever your perspective, Dave is wrong!


My New Year's resolution is to stop being wrong, no matter what your
perspective.

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

This discussion thread is closed

Replies have been disabled for this discussion.