babu17 wrote:
how can i make an HTTP request.
Using any `http(s):' URI.
You said it is not possible directly. so is there any other method to
get it working.
What I meant is that it is not possible to access the server-side object
from client-side script directly, because neither one "knows" of the other.
However, client-side script can make an HTTP request that will trigger a
server-side application that accesses the server-side object. This will
work only if the server-side object is somehow global, such as stored in a
server-side session.
my intention is to store the timeout value in the database using obj1
methods when the user closes browser.
Strongly recommended against (search the archives), because it is not at all
reliable: onunload executes code that creates an host object that allows to
make the HTTP request (e.g. an Image or IXMLHttpRequest object), and this
object is used in the process. Note that `onunload' will also be called if
one navigates away from the current document, and other event handlers are
proprietary.
Reconsider your application design instead.
PointedEars