[WEB4LIB] CGI script to replace a form?

Gutmann tgutmann at suffolk.lib.ny.us
Fri Aug 6 08:43:53 EDT 1999


Byron,

If I understand the situation correctly, I think you could just create a
simple html page with the code for the form essentially the same as you
have it along with some Javascript code to automatically submit the
form--something like this:

<html>
<body>
<form
name="yoursearch" 
action="http://biblioline.nisc.com/scripts/login.dll?login"
 method="post">
   <input type="hidden" name="name" value="USERID">
   <input type="hidden" name="pwd" value="PASSWORD">
   </form>
<SCRIPT LANGUAGE="JavaScript">
	document.yoursearch.submit();
</SCRIPT>
</body>
</html>


Just remember to add a 'name' parameter to the form tag and remove the
submit button. Hope this helps.

Ted Gutmann
Computer Systems Administrator
Emma S. Clark Memorial Library
Setauket, New York
tgutmann at suffolk.lib.ny.us
http://emma.suffolk.lib.ny.us

-----------------------------------------------------------
On Thu, 5 Aug 1999, Byron C. Mayes wrote:

> Greetings from NYC,
> 
> We recently obtained an account with NISC for the web version of Child 
> Abuse and Neglect (CA&N). Going to the URL 
> <http://biblioline.nisc.com/scripts/login.dll?login> takes one to a login 
> screen (as if you couldn't guess) where one must enter a username and 
> password to gain access.
> 
> NISC sent me a way to bypass the login procedure in the form of the form 
> HTML code below:
> 
>   <form action="http://biblioline.nisc.com/scripts/login.dll?login" 
> method="post">
>   <input type="submit" value="go there">
>   <input type="hidden" name="name" value="USERID">
>   <input type="hidden" name="pwd" value="PASSWORD">
>   </form>
> 
> This, obviously, produces a submit button, which is fine for a web page, 
> but not for things like bookmarks and delimited lists which is our 
> preferred method of access to our web-accessible resources.
> 
> OCLC FirstSearch pointed us to a script that automatically logs one in to 
> that system, so our URL for FS points to that script (on our server) and 
> fits nicely into bookmark files, delimited list HTML code, and e-mail 
> messages. I'd like to do the same for CA&N.
> 
> My question is this: is it possible to create a CGI script that will pass 
> the above information to the URL in the same way as the form? if anyone has 
> done something like this and is willing to share the script, I'd be greatly 
> appreciative.
> 
> Thanks,
> Byron C. Mayes
> 
> 
> 
> Prof. Byron C. Mayes Systems Librarian/Asst. Professor
> Hunter College, City Univ. of New York
> Library E316 * 695 Park Avenue * New York, New York 10021
> bcmayes at hunter.cuny.edu  * 212-772-4168 * Fax: 212-772-5113
> Listowner, BLACK-IP, Black Information Professionals' Network
> 



More information about the Web4lib mailing list