What is the best way to get the URL generated by a <FORM>?
Posted: Wed May 19, 2010 5:39 pm
Hi folks,
I'm trying to build a field selector in newLISP. Right now I have the code:
What this function does is return a string that creates a multi-select HTML form (with checkboxes) based on a list. This string can then be printed to the web page. When the user clicks "Submit", it redirects to a URL like this one:
http://localhost:8080/multi-select-subm ... ut=element
Now, from that URL I can probably extract the form values input=document and input=element. But I'm not sure how to get the current URL in the first place.
I am using newLISP and Dragonfly to serve the web pages.
Thanks for any help you can provide!
I'm trying to build a field selector in newLISP. Right now I have the code:
Code: Select all
(define (multi-select-box inputlist)
(let (a "")
(extend a "<form action='multi-select-submit.cgi'")
(dolist (x inputlist)
(extend a "<input type='checkbox' name='input' value='" (string x) "'>" (string x) "<br>"))
(extend a "<input type='submit' value='Submit'>")
(extend a "</form>")
a))
http://localhost:8080/multi-select-subm ... ut=element
Now, from that URL I can probably extract the form values input=document and input=element. But I'm not sure how to get the current URL in the first place.
I am using newLISP and Dragonfly to serve the web pages.
Thanks for any help you can provide!