Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3438316
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:10:21+00:00 2026-05-18T08:10:21+00:00

I’ve been having a play around with Mootools 1.3 server-side today. Its really nice

  • 0

I’ve been having a play around with Mootools 1.3 server-side today. Its really nice took some bashing to get it Classic ASP friendly but still full of goodness ™.

While showing a friend what Mootools can do I came across a strange ASP related error that I’ve not seen before.

Microsoft JScript runtime error '800a138f'

'Response.WriteBlock(...)' is null or not an object

The code that caused it is one of Mootools funky “forEach” helpers:

[1,2,3].each( function( i ) {
   Response.Write( "<b>" + i + "</b>, " );
});

It really does not like this code at all. I commented out the Response.Write and had an empty block and it still threw the error. Very odd. I know ASP does some optimisation magic to group html blocks and asp blocks together (hence the Reponse.WriteBlock comment) but not sure why this would apply here.

This code will run however:

var fruits = [];
fruits.push( "apples" );
fruits.push( "oranges" );

fruits.each( function( fruit ) {
  Response.Write( "<b>" + fruit + "</b>, " );
});

// As will this
var nums = [ 1,2,3,4,5 ];
nums.each( function(i) {
    Response.Write( "<b>" + i + "</b>" );
});

Has anyone got any ideas what is happening to cause this error? I’ll keep digging but wondered if any fellow JScript guys could shed some light. Might just be a ASP quirk?

[Update]

Wierdness continues, managed to get it to work but it seems to depend on what comes before the each loop. So to recap this does NOT work:

<%

[ 1,2,3,4,5 ].each( function(i) {
    Response.Write( "<b>" + i + "</b>" );
});

%>

But this does (notice just the addition of the var line above it):

<%

var something = 1;

[ 1,2,3,4,5 ].each( function(i) {
    Response.Write( "<b>" + i + "</b>" );
});

%>

Very odd indeed. Must be something to do with the way ASP is treating the blocks, maybe there is a rule in the parser about blocks starting with an (what it would see as rather random) array statement or at least its not be programmed to expect me to do that (I don’t think they imagined server side mootools way back when)! Would still like an indepth explanation though so I can better avoid it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:10:21+00:00Added an answer on May 18, 2026 at 8:10 am

    Try changing your code to this…

    <%
    
    ;[ 1,2,3,4,5 ].each( function(i) {
        Response.Write( "<b>" + i + "</b>" );
    });
    
    %>
    

    This is just a hunch.


    In general it’s considered bad practice to begin a line or especially a file with a ( or [ without its own semicolon. The main reason has to do with concatenation…

    e.g.

    //foo.js
    1 + 1 == 2
    
    //bar.js
    ("lol, string")
    
    //foo.js + bar.js
    1 + 1 == 2("lol, string") // TypeError: number is not a function
    

    Since bar.js has no way to know what could eventually be included before it, it should always include its own ; before the ( i.e.

    //bar.js
    ;("lol, string")
    
    //foo.js + bar.js
    1 + 1 == 2;("lol, string") // SUCCESS!!1!
    

    My hunch is that something weird like that is going on in ASP land.
    Since we don’t have access to the source code of JScript or the ASP framework itself there’s no way to be sure what is going on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm trying to select an H1 element which is the second-child in its group
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.