Wednesday, January 03, 2007

Misc things @ JavaScript

Ok/Cancel box:

if (confirm('Like cookies?')) { document.write('you like cookies!') }

The buttons on a confirm box cannot be changed, nor can you specify a
default button

Session object
The Session object is a host object (i.e. not native) that is made
available to JavaScript code processed on the server in an ASP
pre-processing page.

under ASP I believe the Session object's
properties are accessed using ' ( ) ' notation, so in an ASP page,
Session("UserID") = "" is valid.

The ASP Session object cannot be acessed by code running on the client. It is only available to that JavaScript which
runs on the server **before** the ASP page is sent to the client.

An Iframe is a frame, so to get to the page that holds the Iframe you need
'parent'. From the popupwindow to the first window, use the word 'opener'.
So you need parent.opener...
But JS will only communicate between all these windowobjects if they all
reside in the same domain.

No comments: