|
Imran Khan Pathan wrote: I need javascript for password field for checking minimum 6 char and maximum 20 char.
<SCRIPT LANGUAGE="JavaScript">
function validatePwd() {
var invalid = " ";
var minLength = 6;
var pw1 = document.myForm.password.value;
var pw2 = document.myForm.password2.value;
if (pw1 == '' || pw2 == '') {
alert('Please enter your password twice.');
return false;
}
if (document.myForm.password.value.length < minLength) {
alert('Your password must be at least ' + minLength + ' characters long. Try again.');
return false;
}
if (document.myForm.password.value.indexOf(invalid) > -1) {
alert("Sorry, spaces are not allowed.");
return false;
}
else {
if (pw1 != pw2) {
alert ("You did not enter the same new password twice. Please re-enter your password.");
return false;
}
else {
alert('Nice job.');
return true;
}
}
}
</script>
HTML code
<form name=myForm onSubmit="return validatePwd()">
Enter your password twice.
<br>
(At least 6 characters, 20 characters max, and spaces are not allowed.)
<p>
Password: <input type=password name=password maxlength=20>
<br>
Verify password: <input type=password name=password2 maxlength=20>
<p>
<input type=submit value="Submit">
</form>
</center>
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
HI all,
In my application am using drop down list which holds the user ids.currently it holds 51 ids,in selected index changed event or in any other event also,it showing only 50ids,pls suggest me how to find the duplicate values in drop down list control.
Thanks in advance
Have a Nice Day Dudes
|
|
|
|
|
Could you please elaborate bit more??? What is your requirement for drop down list?
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
HI Laxman,
IN debugging am able to see only 60userids,when am traversing through the FOR loop.but primarily there are 61 user ids.
that too one specific id only not able to see.
Here i need to find the duplicate values in the drop down list,coz i feel that only for one specific duplicate value in that list control its working like that.
so pls guide me if any
Have a Nice Day Dudes
|
|
|
|
|
Kushi Bobby wrote: so pls guide me if any
Create an ArrayList of (key,value) pair and bind that arraylist to DropDownList.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hi all,
I m creating a crystal report . i hve sucessfully retrieved data in report , can anyone tell me how do i resize the page of report ? my data in report is overlapping due to limited page size .How can i resize ReportViewer?
|
|
|
|
|
Hi All,
How to restrict the resource utilisation to 30% when a client machine request to server.My application is using more than 60% of resorces of server how to restrict this.
Regards,
Vijaya
vijaya
|
|
|
|
|
vijayaBTS wrote: My application is using more than 60% of resorces of server
How come you know that it is using ?
|
|
|
|
|
Iam using microsoft application center tool test my application using that %processortime is 100%
vijaya
|
|
|
|
|
Hi All,
How to improve the .net application performance from application point of view irrespective of database changes.
Regards,
Vijaya
vijaya
|
|
|
|
|
|
Will Caching increase the memory usage in server ?
|
|
|
|
|
There are many, many ways. But first thing you should do is some profiling... to find what takes most resources.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Actually i don't know which one is taking most resource utilization but by ACT tool i came to know my application was using 100% resources of webserver.
please give me suggestion to minimise this %processortime
vijaya
|
|
|
|
|
|
My sides are splitting.........
|
|
|
|
|
Ctrl + S !
Ctrl + S !!
Ctrl + S !!!
Mehedi Hasan
|
|
|
|
|
Ctrl+F1 for specific help
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
After he trips from the floor, how about CTRL+Z, CTRL+Z, CTRL+Z, CTRL+Z?
|
|
|
|
|
|
Hello Everybody,
I am unable to get that thw opened page is secure or nonsecure.
Actually i want know that page url is starting with http or https
regards
Rahul
rahul saini
|
|
|
|
|
u can use it..
url = Request.ServerVariables("HTTP_REFERER")
in url u will get whole url from addressbar.
now u can check it. whether it's starting from http or https
Thanks,
Sun Rays
|
|
|
|
|
Hello Sun Rays
Thanks for rplying me.
the code you have written is not working
Can you please explain me more clearly
Thanks
Rahul
rahul saini
|
|
|
|
|
That method may not work as the referrer isn't always passed by the browser (the user can disable it if they want) and it wont exist if you type the address directly into the address bar.
Check out my earlier reply on the Request.Url.OriginalString method.
|
|
|
|
|
Rahul,
u try this
write this on your page load event.
Dim str As String
str = Request.Url.OriginalString
in str it will give u whole path of addressbar.
Dim http As Boolean
If str.StartsWith("http:/") Then
http = True
ElseIf str.StartsWith("https:/") Then
http = False
End If
Thanks,
Sun Rays
|
|
|
|