Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alias for Response.Write

Status
Not open for further replies.

trollacious

Programmer
Sep 29, 2004
4,046
US
In client-side Javascript, it's possible to alias document.write(), like:

var write=document.write;

Is it possible to do the same with Response.Write?

I've tried the same (in JS ASP):

var write=Response.Write;

and

function Document()
{
this.write=Response.Write();
return this;
}

var document=new Document();

and have only gotten error messages that sound like Response.Write is not able to be aliased.
 
a possiblity.

rw "Hello World"


sub rw(sOut)
Response.Write sOut
end sub

or


could you use "with"? I havent tried in asp. I do it in VB.

With Response
.Write "Hello world"

end with


****
I use the rw sub and append a vbCRLF during developement
to make debugging easier.

 
Looks like I was approaching it from the wrong direction. Thanks. My ASP is in JS, just for quick portablity from client-side, and this should work there as well as in VBScript.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top