...checkWholeForm()
{
return textonly() && textonly1() && uname();
}
....
//function to check userid
function uname()
{
var iChars = "!@#$%^&*()+=-[]\\\';,/{}|\":<>?";
var iChars1 = "/^\w+\.\w+$/";
if (frmusermaint.txtuserid.value.length == 0)
{
alert('Please enter your user ID')...
...the following code because it is skipping the last condition ("Your user ID is of the wrong format....)
function uname()
{
var iChars = "!@#$%^&*()+=-[]\\\';,/{}|\":<>?";
var iChars1 = "/^\w+\.\w+$/";
if (frmusermaint.txtuserid.value.length == 0)
{
alert('Please enter your user...
...cn.Open(Conn)
set rspos = cn.execute ("select positionName from [position]")
Set rs = Server.CreateObject("ADODB.Recordset")
sql= "SELECT * FROM department WHERE deptName='" & Request.Form("txtdeptname") & "'"
rs.Open sql, cn
cn.execute(sql)
do while not rs.eof
%>
<font...
here u r:
<script language="javascript">
function checkWholeForm()
{
return textonly() && checkDropdown();
}
//function to check alphabetic (Department name)
function textonly()
{
var checkOK="abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var checkstr;
var allValid=true;
if...
hmm this bit can be removed and it will still work for the dept name. the problem lies with the dropdown and am having a really bad time finding out wat's wrong with it.
yes thks for that but let me specify that the prob is only with the dropdown list. even when i correctly select something and the deptname is ok, i still get the popup" you did not selected an option from drop down...
hmmm i think i rejoiced too quickly. the fact is that even when i do select an option form the drop down , i still get the error msg and the form still submits itself.
wat is the prob now?
can anybody suggest how i can validate a username in the form "jane.keen" entered in a textbox. the point between the firstname and last name is mandatory.
Cheers,
Gold Pearl.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.