Archive of UserLand's first discussion group, started October 5, 1998.

Re: Frontier Interface Design

Author:Mike Mell
Posted:6/16/1999; 4:14:53 PM
Topic:Frontier Interface Design
Msg #:7472 (In response to 7140)
Prev/Next:7471 / 7473

Actually, the script you reference at mainResponder.member.setCookie does NOT set a simple cookie.

The script I wanted, and wrote, follows. All it does is precisely handle the needs of setting a cookie as described at the Netscape Cookie Spec.

on setCookie (nameValue,expires=nil,path=nil,domain=nil,secure=nil) { //mike mell
«nameValue is must be in the form of "name=value"
«no white space, semi-colons or commas
local {
«pta = html.getPageTableAddress()
cookietext};
on add(s) {
cookietext = cookietext + s}; add(nameValue); if expires != nil {
add(";expires=" + expires)};
if path != nil {
add(";path=" + path)};
if domain != nil {
add(";domain=" + domain)};
if secure != nil {
add(";secure=" + secure)};
pta^.responseHeaders.["Set-Cookie"] = cookietext}



















This page was archived on 6/13/2001; 4:50:51 PM.

© Copyright 1998-2001 UserLand Software, Inc.