Jon Clausen <[EMAIL PROTECTED]> wrote: > Subject: [leaf-user] [OT] Weblet "abuse" > <snip>
LOL..Wives or girlfriends still can't figure out why this stuff is so amusing. Sounds like an interesting project. > So what I'm asking now is this: > > Is anyone aware of any way to have an input field on a page served by the > weblet...? > > It just occurred to me that I might get away with setting up a 'settime' > script in cgi-bin that could get the value from the address line in the > browser... something like: > > http://blinder/cgi-bin/settime?06:30 > > -but a 'real' input field on the page *would* be nicer... > > I realize that the weblet is really only meant to be a passive thingy, but I If you can still find a copy of "The CGI Book" published by New Riders in 1995 by author Bill Weinman at http://bw.org/, then you will find many sh script examples for handling cgi data. The samples used to be on his web site. I think he had a crash and has not restored the files yet--http://bw.org/email/. I couldn't find any restrictions on posting the code, but I think you would want to talk to the author. It is not that it cannot be done, but sh, bash, or ash shell scripts have a difficult time processing the query string returned from html form get or post methods. In order to do your task in weblet with ash you will need to know a little about cgi and html conventions--that book is a perfect well written introduction to this issue, what variables a post or get method would return to your script how to handle regular expressions to process the query_string variable or on stdin with sed Since you are compiling in C already, a C program or other scripting language could do the same thing depending on the space you have available. Essentially, the language of choice would have to process QUERY_STRING = settime1=06%3A30&settime2=09%3A30 using an example similar to your http://blinder/cgi-bin/settime?06:30 example. This is the wicked little string you get to parse in CGI. I did get weblet to produce this string by the way. The last issue is that you would have to include your (ash/c exe/other script) file in the weblet.lrp package. You would need to add the new scripts in the /var/lib/lrpkg/weblet.list file. You will also need to look at file permissions, ownership, and the placement of your files in the /var/sh-www weblet world. Finally backup weblet. There are some other docs in the faq and David Douthitt has a developer's guide that will help on the packaging issues. > thought I might as well ask anyway... In case somebody had already made > something that might be adapted... > > TIA for any thoughts/ideas > > Jon Clausen Hope this helps. Greg Morgan _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] ------------------------------------------------------------------------ leaf-user mailing list: [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html
