[Hartford-pm] Re: [Boston.pm] Help using LWP to change password Q's?

Eric K. Olson olson at xynergy.com
Tue Aug 24 14:09:49 CDT 2004


Hi All,

My understanding is that the original question was "how does the 
javascript interact with the FORM ACTION parameter?"

I think the usual answer is "it does not".  If the javascript returns 
false, the form is submitted with its original ACTION.  If the 
javascript returns true, the form is not submitted at all.  In your 
case, the javascript is probably checking the fields for validity and 
only allowing the submit if all the tests pass.

It IS possible to modify the ACTION in the javascript, but it is rarely 
done.  See 
http://www.javascript-coder.com/html-form/html-form-action.phtml for an 
example.

The fact that the ACTION doesn't have an extension is not important-- 
CGI scripts don't have to have any particular extension, if the server 
is configured appropriately.

Cheers,

-Eric


Bob Mariotti wrote:
> Fellow mongers;
> 
> I have a mental block!  I just cannot seem to get this logic to an 
> understandable point.  Therefore, I was hoping that some of you could 
> explain the process somewhat.
> 
> I have several reasonably complex scripts that use LWP to interact with 
> a remote secured web site.  Works great and reliably.  Now the remote 
> service site has implemented expiring passwords requiring the clients 
> (my script) to change passwords periodically before its next access.
> 
> Simple I'd say!  So I created a relatively short script to do just that.
> 
> Here's where my brain fry comes in:
> 
> Q: How does the "submit" button interrelate with the "next" URL?
> 
> Example:
> 
> Initial https connect to specified page : 
> https://xxx.yyy.com/ssp/jsp/blah.jsp
> 
> LWP received the resulting page successfully which contains a form that 
> has fields for username, current password, new password, new password 
> again.  The usual stuff.
> 
> By examining the received HTML code I determined the fieldnames used 
> above so that I could load them on my next POST operation.  I also noted 
> that on the FORM statement the value of the ACTION parameter was 
> "ABC123" with NO extension.   Also, the SUBMIT tag has an onClick 
> function similar to this:  "onClick="return subrname()".
> 
> I assume that if the LWP POST operation is performed it emulates someone 
> clicking on the SUBMIT button.  The subroutine is a javascript editing 
> routine that issues an alert(msg) and returns false or true.
> 
> Assuming the response is true... must the programmer alter the URL for 
> the POST operation at all?  Or will LWP and/or HTTP take care of 
> manipulating the URL in combination with the ACTION value?
> 
> I'm sorry for the somewhat basic basis for this query but sometimes the 
> gray cells don't work as well as they should.
> 
> Thanks for ANY help and/or advice anyone can supply (please - no 
> harassing?).
> 
> Bob - Hartford PM
> +----------------------------------------+
> |Bob Mariotti   | Financial DataCorp     |
> |Exec V.P.      | 703 Hebron Avenue      |
> |(860) 657-8983 | Glastonbury, CT 06033  |
> |email: r.mariotti at financialdatacorp.com |
> |Registered Linux User #320395           |
> +----------------------------------------+
> 
> _______________________________________________
> Boston-pm mailing list
> Boston-pm at mail.pm.org
> http://mail.pm.org/mailman/listinfo/boston-pm


More information about the Hartford-pm mailing list