CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2013

    automatically login to a website via javascript

    Good Morning Gentlemen,

    i am trying to add a shortcut to an internal website that will automatically log in to a public website so that the users dont have to keep entering in the username and password. I did some research and tried the following code below but it does not work. Please advise.

    function login() {
    <BODY onLoad="login()">
    <FORM NAME="form" METHOD="GET">
    <INPUT TYPE="hidden" NAME="LoginPortletFormID" VALUE="username">
    <INPUT TYPE="hidden" NAME="LoginPortletFormPassword" VALUE="password">

    thank you!!

  2. #2
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002

    Re: automatically login to a website via javascript

    If the form processing is done correctly, it will check the HTTP referrer and make sure the form is coming from it's own site, not anyone elses. If that is the case, you will not be able to auto-login using a custom made form from another web server.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.