Given the problems I'm having with the GUI framework I thought it
might be a good idea to skip it all together and try it the old
fashioned, simple way since we're just talking about two field form
anyway.
So I changed the signin form to look like this:
(de signin ()
(html 0 "Viz Reader" *Css NIL
(let Usr (db 'uname '+User *Uname)
(if (and Usr (= (; Usr pwd) *Pwd))
(let Uid (; Usr uid)
(cookie 'uid Uid)
(setq *Cookies (cons 'uid Uid))
(redir))
(<post> NIL "@signin"
(and (or *Uname *Pwd) (<div> NIL "Could not login."))
(<table> NIL NIL NIL
(<row> NIL "Username" (<field> 10 '*Uname))
(<row> NIL "Password" (<passwd> 10 '*Pwd))
(<row> NIL "" (<submit> "Login"))
(<row> NIL (<href> "Sign Up" "@register"))))))))
It is however giving me this when I submit it:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Viz Reader</title>
<base href="http://localhost:8080/"/>
<link rel="stylesheet" type="text/css"
href="http://localhost:8080/projects/rss-reader/css/styles.css"/>
<script type="text/javascript" src="http://localhost:8080/lib/form.js"></script>
</head>
<body>HTTP/1.0 303 See Other
Server: PicoLisp
Location: http://localhost:8080/@desktop
Content-Type: text/html
Set-Cookie: $uid=+499978151698647371592345114; path=/
Content-Length: 89
<HTML>
<HEAD><TITLE>303 See Other</TITLE></HEAD>
<BODY><H1>See Other</H1></BODY>
</HTML>
</body></html>
A strange result where the headers and some unwanted HTML are showing
up in the body. Is (redirect) somehow relying on the GUI framework?
/Henrik
--
UNSUBSCRIBE: mailto:[email protected]?subject=unsubscribe