/    Sign up×
Community /Pin to ProfileBookmark

Gives error on button click even

Hello
When I click on Register button I get this error –
Message: Object expected
Line: 20
Char: 1
Code: 0
URI: [url]http://localhost/goodlogin/registerform.php[/url]

This is my registerform.php code –

[code=html]<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=ISO-8859-1″>
<title>register</title>
<script type=”forms.js” type=”text/javascript”></script>
<script type=”sha512.js” type=”text/javascript”></script>
</head>
<body bgcolor=”black” style=”color:white;”>
<FORM ACTION=”register.php” METHOD=”POST”>
<h1>welcome to the registration page</h1>
please input the registration details to create an account here<br>
<table border=”2″>
<tr>
<td>email :</td><td><input name=”regemail” type=”text” size”30″></input></td>
</tr>
<tr>
<td>password :</td><td><input name=”regpass1″ type=”password” size”20″></input></td>
</tr>
</table>
<input type=”button” value=”Register” onclick=”formhash(this.form, this.form.regpass1);” /> </input>
</FORM>
</body>
</html>
[/code]

And this is my forms.ja code –

[CODE]function formhash(form, password) {
// Create a new element input, this will be out hashed password field.
var p = document.createElement(“input”);
// Add the new element to our form.

p.name = “p”;
p.type = “hidden”
p.value = hex_sha512(password.value);
// Make sure the plaintext password doesn’t get sent.
password.value = “”;
// Finally submit the form.
form.appendChild(p);
form.submit();

}[/CODE]

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@ZABIOct 01.2012 — where is [B]hex_sha512()[/B] defined ?
×

Success!

Help @vishalonne 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.2,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...