"Rommel Martinez" ebzzry@gmail.com writes:
Hi! How do I make an HREF link "call" a dispatch function (and "pass" parameters without having to write long strings like this:
"/?foo=1&bar=2&baz=3"
I am able to do it with forms, using POST, but not with HREFs. :-(
Hey Rommel,
one way to do that is to check Dr. Weitz's very own url-rewrite[1], a Hunchentoot dependency, in particular ADD-GET-PARAM-TO-URL:
* (add-get-param-to-url "http://common-lisp.net/" "foo" "bar") "http://common-lisp.net/?foo=bar"
* (add-get-param-to-url "http://common-lisp.net/index.html?frob=42" "foo" "bar") "http://common-lisp.net/index.html?frob=42&foo=bar"
* (add-get-param-to-url "http://common-lisp.net/" "foo" "+") "http://common-lisp.net/?foo=%2B"
Regards, Victor.