[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Check for security mode
Stefan Hornburg wrote:
>
> ****** message to minivend-users from Stefan Hornburg <racke@linuxia.net> ******
>
> Hello, MiniVendors !
>
> Is their a way to determine whether on a page served by the secure server or
> served by the normal server ?
>
> Bye
> Racke
I know a solution by javascript! Maybe, this can help you! Here is part
from Netscape " Javyscript ClientReference":
----snipp----------
Description
The protocol property specifies a portion of the URL. The protocol
indicates the access method of the URL. For example, the value "http:"
specifies
HyperText Transfer Protocol, and the value "javascript:" specifies
JavaScript code.
You can set the protocol property at any time, although it is safer to
set the href property to change a location. If the protocol that you
specify cannot be found in
the current location, you get an error.
The protocol property represents the scheme name of the URL. See Section
2.1 of RFC 1738
(http://www.cis.ohio-state.edu/htbin/rfc/rfc1738.html) for complete
information about the protocol.
Examples
In the following example, the window.open statement creates a window
called newWindow and loads the specified URL into it. The document.write
statements
display properties of newWindow.location in a window called msgWindow.
newWindow=window.open
("http://home.netscape.com/comprod/products/navigator/
version_2.0/script/script_info/objects.html#checkbox_object")
msgWindow.document.write("newWindow.location.href = " +
newWindow.location.href + "<P>")
msgWindow.document.write("newWindow.location.protocol = " +
newWindow.location.protocol + "<P>")
msgWindow.document.close()
The previous example displays output such as the following:
newWindow.location.href =
http://home.netscape.com/comprod/products/navigator/
version_2.0/script/script_info/objects.html#checkbox_object
newWindow.location.protocol = http:
See also
Location.hash, Location.host, Location.hostname, Location.href,
Location.pathname, Location.port, Location.search
----snipp----------
Cheers,
Joachim
--
-------------Hans-Joachim Leidinger---------------------