IIS ASP - Response.AddHeader problem when using Javascript as the server-side scripting language

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > February 2007 > Response.AddHeader problem when using Javascript as the server-side scripting language





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Response.AddHeader problem when using Javascript as the server-side scripting language
Andyza

2007-02-16, 7:19 am

With reference to the ASPFAQ 2161 article -
http://classicasp.aspfaq.com/genera...-mime-type.html

Does the 'Content-Disposition' code work if the user is using
JAVASCRIPT as the SERVER SIDE scripting language, i.e.:

<%@LANGUAGE=JAVASCRIPT%>

If I add this header to a page that uses Javascript as the server-side
scripting language:

Response.ContentType = "application/save"
Response.AddHeader "Content-Disposition: attachment;
filename=MySpreadsheet.xls;"

Then the page crashes with:

Microsoft JScript compilation (0x800A03EC)
Expected ';'
/myform.asp, line 8, column 19
Response.AddHeader "Content-Disposition: attachment;
filename=MySpreadsheet.xls;"

Line 8, column 19 is:
Response.AddHeader "Content-Disposition: attachment;
filename=MySpreadsheet.xls;"

It looks like IIS doesn't like something in the "Content-Disposition:
attachment; filename=MySpreadsheet.xls;" part of line 8 - probably a
Javascript syntax thing.

How can I fix it?

Anthony Jones

2007-02-16, 1:17 pm


"Andyza" <andyza@webmail.co.za> wrote in message
news:1171629801.509927.205750@t69g2000cwt.googlegroups.com...
> With reference to the ASPFAQ 2161 article -
>

http://classicasp.aspfaq.com/genera...-mime-type.html
>
> Does the 'Content-Disposition' code work if the user is using
> JAVASCRIPT as the SERVER SIDE scripting language, i.e.:
>
> <%@LANGUAGE=JAVASCRIPT%>
>
> If I add this header to a page that uses Javascript as the server-side
> scripting language:
>
> Response.ContentType = "application/save"
> Response.AddHeader "Content-Disposition: attachment;
> filename=MySpreadsheet.xls;"
>
> Then the page crashes with:
>
> Microsoft JScript compilation (0x800A03EC)
> Expected ';'
> /myform.asp, line 8, column 19
> Response.AddHeader "Content-Disposition: attachment;
> filename=MySpreadsheet.xls;"
>
> Line 8, column 19 is:
> Response.AddHeader "Content-Disposition: attachment;
> filename=MySpreadsheet.xls;"
>
> It looks like IIS doesn't like something in the "Content-Disposition:
> attachment; filename=MySpreadsheet.xls;" part of line 8 - probably a
> Javascript syntax thing.
>
> How can I fix it?
>


All procedures are functions in JScript all calls must use ( )

Try:-

Response.AddHeader("Content-Disposition: attachment;
filename=MySpreadsheet.xls;")



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com