Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #14579
| Path | csiph.com!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Gene Wirchenko <genew@ocis.net> |
| Newsgroups | comp.lang.javascript |
| Subject | Function Objects |
| Date | Tue, 19 Jun 2012 16:35:21 -0700 |
| Organization | A noiseless patient Spider |
| Lines | 35 |
| Message-ID | <bm22u7l5dbs0rrdeloru3fd3sct7n8g201@4ax.com> (permalink) |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| Injection-Info | mx04.eternal-september.org; posting-host="wKah3EH8kutwAOV6+9FiEQ"; logging-data="22211"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/RLCc2TfmJ222813lxKhQ4CKU1bpH+Y7g=" |
| X-Newsreader | Forte Agent 4.2/32.1118 |
| Cancel-Lock | sha1:bUKgQFN1WMxbAHo4QZ/vuN4zmtw= |
| Xref | csiph.com comp.lang.javascript:14579 |
Show key headers only | View raw
Dear JavaScripters:
In each case, the code is the in the head of the page.
I can code
var Output;
Output=alert;
Output("This is the output.");
and see the expected alert box.
I can code
var Output;
Output=document.write;
Output("This is the output.");
but I do not get the output. I get an error of "Error: Invalid
calling object".
I can code
var Output;
Output=document;
Output.write("This is the output.");
and see an output line in the body.
Why is the second example above wrong? I am using IE 9 on
Windows 7.
Sincerely,
Gene Wirchenko
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
Function Objects Gene Wirchenko <genew@ocis.net> - 2012-06-19 16:35 -0700
Re: Function Objects Stefan Weiss <krewecherl@gmail.com> - 2012-06-20 02:09 +0200
Re: Function Objects Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-06-20 15:43 +0200
Re: Function Objects Stefan Weiss <krewecherl@gmail.com> - 2012-06-20 17:29 +0200
csiph-web