By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,382 Members | 1,623 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,382 IT Pros & Developers. It's quick & easy.

Host V Language Objects

P: n/a
Howdy All!

JavaScript uses objects created by the host: Window, Document, Form and
Image objects
JavaScript creates other objects by itself: String or Date etc..

My question is: does it ever make a difference to the programmer whether you
using a host or a language object?

Thanks for any advice!

Rob
:)

Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I was thinking in terms of:
DOM is created by the browser...
so DOM is also available in other script languages right? Perl, VBScript..
PHP?

Which means that knowledge of these objects are directly transferable to
other languages that also allow access to the DOM..

Is this correct?

Thanks!

Rob
:)
Jul 20 '05 #2

P: n/a
"Robert Mark Bram" <re********@REMOVE.THIS.optusnet.com.au> writes:
I was thinking in terms of:
DOM is created by the browser...
so DOM is also available in other script languages right? Perl, VBScript..
PHP?
That depends on the browser. IE probably reveals the DOMs tructure to
any script language that can be used with the Windows Scripting Host.
That includes VBScript and PerlScript. Since PHP is a server-side
script, it won't have access to the client's DOM representation.

Other browsers, not written for Windows only, only accepts the script
languages they understand themselves. That is often just Javascript.
Which means that knowledge of these objects are directly transferable to
other languages that also allow access to the DOM..

Is this correct?


Sure. There have been several examples in this group alone of
solutions that are part VBscript and part Javascript. They interact
through the DOM, and can even call each other.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #3

P: n/a
> JavaScript uses objects created by the host: Window, Document, Form and
Image objects
JavaScript creates other objects by itself: String or Date etc..

My question is: does it ever make a difference to the programmer whether you
using a host or a language object?


Yes. There are some objects offered by IE that are toxic to JScript. Attempting
to access the standard object properties causes failure. I think this was just
laziness/stupidity on Microsoft's part, but it is something you must watch out
for.
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.