Forums
This topic is locked
stop adding <%@LANGUAGE="VBSCRIPT"%>
Posted 30 Jul 2002 22:40:28
1
has voted
30 Jul 2002 22:40:28 David Behan posted:
I know this is in DW MX but how do I stop MX adding <%@LANGUAGE="VBSCRIPT"%> to the top of the page. This causes errors when I use include files, etc. and it does my head in having to go back in to delete the line.I can't find an option to stop MX doing it so any one know what to do to stop it?
Thanks
Dave
_________________________
David Behan - www.site-manager.com/af.asp?a=11&l=1tds9p6x2
Replies
Replied 31 Jul 2002 00:22:15
31 Jul 2002 00:22:15 Dave Thomas replied:
I don't think there is an option to do this dave.
I think this is set when you choose your server language set up within your application server.
So choosing "Javascript" as your scripting language should give the line;
<%@LANGUAGE="JAVASCRIPT"%> or so i'd assume.
What are the errors you get when using includes?
"Get the kettle on, time for a brew"
I think this is set when you choose your server language set up within your application server.
So choosing "Javascript" as your scripting language should give the line;
<%@LANGUAGE="JAVASCRIPT"%> or so i'd assume.
What are the errors you get when using includes?
"Get the kettle on, time for a brew"
Replied 31 Jul 2002 05:34:42
31 Jul 2002 05:34:42 aegis kleais replied:
The language directive is a vital part to ASP. I don't put it past reality for this to be a possible bug, though Macromedia usually makes some pretty stellar apps.
The placement of that code is a safeguard be it that if you ever run your code on any other server, it will make sure it runs in the proper language. (aside from what the server specifies)
I can't see it being the cause of the problem, however includes are picky things themselves, so delve a little more into the exact problem por favor.
Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])
The placement of that code is a safeguard be it that if you ever run your code on any other server, it will make sure it runs in the proper language. (aside from what the server specifies)
I can't see it being the cause of the problem, however includes are picky things themselves, so delve a little more into the exact problem por favor.
Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])
Replied 31 Jul 2002 10:34:26
31 Jul 2002 10:34:26 Ricardo Ribeiro replied:
Oh no dudes... it is true. Sometimes this line causes an error. It happened to me a couple of years ago, and I saw it again last week.
As the man says, it happens when there are included files, and the server error is something like this:
"You can't have <%@LANGUAGE="JAVASCRIPT"%> twice"
As the man says, it happens when there are included files, and the server error is something like this:
"You can't have <%@LANGUAGE="JAVASCRIPT"%> twice"
Replied 31 Jul 2002 10:48:30
31 Jul 2002 10:48:30 David Behan replied:
That line can only be used once on a page and if used must be the first line on the page. If I have page1.asp with that line in it that is ok. But if on page1.asp, I include page2.asp with that line as well it causes an error. I know it does and why so I go in and delete the line from the include file. If I create a new recordset on page2.asp after deleting the line MX adds it back in again.
It's just annoying and was hoping to be able to turn off the bit that inserts it everytime. There is a small bug in it though. Sometimes when adding recordsets on a page it does add the line twice on the one page. And that causes an error.
Ah well.....
_________________________
David Behan - www.site-manager.com/af.asp?a=11&l=1tds9p6x2
It's just annoying and was hoping to be able to turn off the bit that inserts it everytime. There is a small bug in it though. Sometimes when adding recordsets on a page it does add the line twice on the one page. And that causes an error.
Ah well.....
_________________________
David Behan - www.site-manager.com/af.asp?a=11&l=1tds9p6x2
Replied 31 Jul 2002 18:52:16
31 Jul 2002 18:52:16 aegis kleais replied:
Right. IF your include has a LANGUAGE directive, then having 2 will indeed cause an error. And it's just a matter of devising a method to fix this. YOu may want to try:
<!--#include file="includes/lang_vb.asp"-->
(and that code would contian<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
<% @LANGUAGE="VBSCRIPT" %>
or you can place:
<!--#include file="includes/lang_js.asp"-->
(and that code would contain<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
<% @LANGUAGE="JAVASCRIPT" %>
And just make sure to remove the initial ASP LANGUAGE DIRECTIVE placed on each page. Ask Macromedia that in a patch upgrade they include the option to turn that on and off.
Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])
<!--#include file="includes/lang_vb.asp"-->
(and that code would contian<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
<% @LANGUAGE="VBSCRIPT" %>
or you can place:
<!--#include file="includes/lang_js.asp"-->
(and that code would contain<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
<% @LANGUAGE="JAVASCRIPT" %>
And just make sure to remove the initial ASP LANGUAGE DIRECTIVE placed on each page. Ask Macromedia that in a patch upgrade they include the option to turn that on and off.
Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])