Jump to content

Recommended Posts

Posted

Hi,

Is there a way that script can throw a message when the login fails?

I have a webpage (internal) which says "Invalid Login Information" and it's in span tag.

<span class="error">
                Invalid Login Information.
            </span>

I am able to bring this in a Msgbox however, it keeps popping even on Genuine login.

Here is my code:

Local $oForms = _IEFormGetCollection($oIE)
For $oForm In $oForms
    If $oForm.name = "loginForm" Then
        MsgBox(0, "Warning", "Incorrect Login Credentials. Please try again")
        Exit
    EndIf
Next

Any help is appreciated. Thanks.

Posted

your code does not check for the string "Invalid Login Information". it checks for any form named "loginform". why are you so sure that the "loginform" only appears when login fails?

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

WinPose - simultaneous fluent move and resize

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

Magic Math - a math puzzle

Demos:

Title Bar Menu - click the window title to pop-up a menu

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...