1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0//EN">
6 <style type=
"text/css">
9 font-family: verdana
, sans-serif
;
29 text-decoration:underline
;
34 text-decoration: none
;
47 border-bottom-width:1px;
48 border-bottom-style:dotted
;
64 <table width=
"90%" border=
"0" cellspacing=
"1" cellpadding=
"5">
67 <big><tt>Global.helma.Http.prototype.setCookie
(name,
value)
</tt></big><br>
73 Adds a cookie with the name and value passed as arguments
74 to the list of cookies to send to the remote server.
<br><br>
77 <li><b>Parameter
</b> <code>{String}
</code>:
<br/>
78 name The name of the cookie
<li><b>Parameter
</b> <code>{String}
</code>:
<br/>
79 value The value of the cookie
82 <li><b>See also
</b><br>
84 <li><b>See also
</b><br>
94 <table width=
"90%" border=
"0" cellspacing=
"1" cellpadding=
"5">
96 <td>Sourcecode in /root/helma-
1.6.1/modules/helma/Http.js:
97 <pre><font color=
"#aaaaaa">257:
</font> this.setCookie = function(name, value) {
98 <font color=
"#aaaaaa">258:
</font> if (name != null
&& value != null) {
99 <font color=
"#aaaaaa">259:
</font> <font color=
"#33aa00"> // store the cookie in the cookies map
100 <font color=
"#aaaaaa">260:
</font> </font> if (!cookies) {
101 <font color=
"#aaaaaa">261:
</font> cookies = {};
102 <font color=
"#aaaaaa">262:
</font> }
103 <font color=
"#aaaaaa">263:
</font> cookies[name] = new helma.Http.Cookie(name, value);
104 <font color=
"#aaaaaa">264:
</font> }
105 <font color=
"#aaaaaa">265:
</font> return;
106 <font color=
"#aaaaaa">266:
</font> }