Closed Thread Icon

Topic awaiting preservation: Wierd asp-problem (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=22064" title="Pages that link to Topic awaiting preservation: Wierd asp-problem (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Wierd asp-problem <span class="small">(Page 1 of 1)</span>\

 
amikael
Bipolar (III) Inmate

From: övik
Insane since: Dec 2002

posted posted 06-05-2004 19:43

This one is a bit wierd..
I have this setup:

<html>
<!-- #include some aspscripts using JScript -->
<b>Html-code i dont want to show up in the browser.</b>
</html>

In the included JScript i have this code:

<script runat="server" language="Jscript">
Response.Buffer=true;
Response.Clear()
</script>

Hoping this will prevent the html-part to be sent to the browser.
No such luck..but wierdly enough, this works is if I set the language before.

<html>
<%@ LANGUAGE="JScript" %>
<!-- #include some aspscripts using JScript -->
<b>Html-code i dont want to show up in the browser.</b>
</html>

Now it works, but why???
Why should the language being set make any difference?
The script is run as JScript anyway??

(^-^)b

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 06-06-2004 17:47

ahh... but is it run at all, if you don't set the language? How do you know?

PS: why can't you just turn the html you don't want to be sent into comments? Or turn it into a function that returns the output, instead of printing it, then don't print it in the appropriate cases. Or don't built it the first place...

amikael
Bipolar (III) Inmate

From: övik
Insane since: Dec 2002

posted posted 06-06-2004 19:57

I need to block the html, because I load and print it to page after I re-formatted it into valid xhtml.
I don't want two instances of this code - raw and formatted - on the same page.
It's a meta-effect, sort of, and it works when I use Jscript and not with VBscript.
I tried to include the html between asp-tags and comment it out, but that would'nt run.

(^-^)b

« BackwardsOnwards »

Show Forum Drop Down Menu