/    Sign up×
Community /Pin to ProfileBookmark

Onblur problem,please help

[CODE]<html>

<head>

<title>You must login first before you order any book</title>

<script language=Javascript type=”text/javascript”>

function checkname(x)
{

if(x.value==””){
window.alert(“you must enter a username”)
x.focus()

}
}

function checkpass(y)
{

if(y.value==””){
window.alert(“you must enter a password”)
y.focus()

}
}
</script>

</head>
<body>

<a href=”homepage.html”> Back To Home</a>

<form name=reg method=”POST” action=”login.php”>
<p>&nbsp;</p>
<p><b><font size=”5″>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
You must login first before you order any book</font></b></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Username
<input type=”text” name=”username” size=”20″ onblur=”checkname(this)”></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Password&nbsp;<input type=”text” name=”password” size=”20″ onblur=”checkpass(this)”></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type=”submit” value=”Submit” name=”B1″>&nbsp;&nbsp;&nbsp;&nbsp; <input type=”reset” value=”Reset” name=”B2″></p>
</form>

</body>

</html>[/CODE]

my problem is once the error message pop up,unable to stop it ,it will loop foever.How to edit this code?

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @cty 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,
)...