HTTPCookie
This property is used in conjunction with the HTTP method of uploading images
from a user's local machine to the server. This property declares that the
cookie should be sent with the HTTP request.
Applies To
EditLive Object
Syntax
| JavaScript |
object.setHTTPCookie(
sCookie );
[ sCookie = ] object.getHTTPCookie();
|
Possible Values
sCookie
WHERE sCookie = "<name>=<value>
[;<name>=<value>]..." |
Required. String that specifies
the Cookie object to be sent with the HTTP POST containing the image
data. |
This property is read/write.
Examples
JavaScript
The following example would pass through two cookies.
function
window_onload() { editLive1.setEditLiveMode(
'HTMLString' ); editLive1.setPOSTAcceptorURL(
'http://www.yourhost.com/upload_script.asp' ); editLive1.setHTTPImageURL(
'http://www.yourhost.com/images.htm' );editLive1.setHTTPCookie('cookie1=cookieValue1;cookie2=cookieValue2' );
}
The following example would set the Cookie equal to the cookie of the current
page.
function window_onload() {
editLive1.setEditLiveMode( 'HTMLString' );
editLive1.setPOSTAcceptorURL( 'http://www.yourhost.com/upload_script.asp' );
editLive1.setHTTPImageURL( 'http://www.yourhost.com/images.htm' );
editLive1.setHTTPCookie( document.cookie );
}
The following example would create a persistent cookie with an expiry date of
January 1, 2002.
function window_onload() {
editLive1.setEditLiveMode( 'HTMLString' );
editLive1.setPOSTAcceptorURL( 'http://www.yourhost.com/upload_script.asp' );
editLive1.setHTTPImageURL( 'http://www.yourhost.com/images.htm' );
editLive1.setHTTPCookie( 'bobcookie=test1#expires#Tue, 01-Jan-2002 00:00:00 GMT' );
}
Remarks
This property is only relevant if uploading images via HTTP.
The cookie may be a session or persistent cookie.
Minimum Version
EditLive! 2.1 or greater
|