/    Sign up×
Community /Pin to ProfileBookmark

Neebie Needs Help with Javascript form script

Hello Everyone.

I have the form below and I am wanting some help or script suggestions to create a username and password check. If someone enters the wrong username and/or password I would like a message to appear alerting of the wrong entry. All info is stored in the server the form post too.

[CODE] <form action=”http://domain.net/clientportal/default_login.asp” method=”post” name=”form1″ onsubmit=”return validatePasswords()”><table class=”mceVisualAid” style=”height: 152px;” align=”center” border=”0″ width=”170″>
<tbody>
<tr>
<td class=”mceVisualAid”>
<h5>Username:</h5>
</td>
<td class=”mceVisualAid”>
<h1><input size=”17″ id=”username” class=”bodytext” name=”username” type=”text”></h1>
</td>
</tr>
<tr>
<td class=”mceVisualAid” colspan=”2″>&nbsp;</td>
</tr>
<tr>
<td class=”mceVisualAid”>
<h5>Password:</h5>
</td>
<td class=”mceVisualAid”>
<h1><input size=”17″ id=”password” lass=”bodytext” name=”password” type=”text”></h1>
</td>
</tr>
<tr>
<td class=”mceVisualAid” colspan=”2″>&nbsp;</td>
</tr>
<tr>
<td class=”mceVisualAid”>&nbsp;</td>
<td class=”mceVisualAid”>
<div align=”right”><input value=”http://www.domain.net/index.php/client-login” name=”redirecturl” type=”hidden”> <input src=”http://domain.net/images/signin-2.png” mce_src=”images/signin-2.png” value=”Submit” name=”Submit” type=”image”></div>
</td>
</tr>
</tbody>
</table>
</form>[/CODE]

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@rayhabMar 21.2009 — For that, you need server verfication.. so you should do it in asp, not javascript.

But if you really wanted to you can use ajax to check the server if user/pass was correct.
×

Success!

Help @pphfl spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...