C
Christopher Brandsdal
If I have a .ASP page that runs JScript code - is it possible to include an
..ASP page that runs VBscript???
..ASP page that runs VBscript???
Atrax said:you could convert one into a WSC and use that, or you could use
<script runat="server"> rather than ASP delimiters...
Roland Hall said:Be aware of the execution order...
help & support, searching for information stored on this
computor,recieving genetic failure.
help & support,searching for information on this
computor,recieving genetic failure
Mike Florio said:Only limitation is that you can't pass a querystring to
Server.Execute().
Dave Anderson said: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".
Bob Barrows said:Yes! It's obvious a mutation has occurred ...
Mark Schupp said: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".
Roland Hall said: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!
...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.
Dave Anderson said: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.
Roland Hall said: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.
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?!
Code not executing in the order you wanted it to?Dave Anderson said:Define trouble.
One does not define the other however, you did say 'suggest.' Using twoI 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.
That's all I have been saying. It is better to know than not know. FromBut more to the point, order of execution is just SOMETHING TO KNOW about
ASP.
Define trouble. (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:=If you put objects into session or application variables,
you can get in trouble,
Define trouble. (O:=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.
It could be.BFD.
The Bible has been around for many years but how many cannot recite the 10Mixing scripting languages doesn't have to be intuitive, it merely
should be documented.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvid/html/msdn_vbnjscrpt.aspAnd it is:
I agree but you cannot know everything. This NG demonstrates that even theMy point is that people should understand the technology they are using,
It's not just a river in Egypt anymore. (O:=and
the existence of the FAQ is not inconsistent with that or anything else I
have said in this thread.
This doesn't work - mismatch error
[client-side example]
Change the order of the script blocks and it works:
It's modified a bit but not much. It's from some documentation
from Microsoft. It must be unreliable.
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.