Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Re: acess input box


Message #1 by <odempsey@b...> on Fri, 15 Nov 2002 21:37:48 -0000
thanks Joe
I feel a bit silly:-)

thanks again

Oliver


----- Original Message ----- 
From: "Joe Fawcett" <joefawcett@h...>
To: "javascript" <javascript@p...>
Sent: Saturday, November 16, 2002 9:39 AM
Subject: [javascript] Re: acess input box


> But your form is not called 'newreg' it's 'form1'.
> Joe
> ----- Original Message ----- 
> From: <odempsey@b...>
> To: "javascript" <javascript@p...>
> Sent: Friday, November 15, 2002 9:37 PM
> Subject: [javascript] Re: acess input box
> 
> 
> > Hi folks
> > I am having trouble with this code, I am sure it is only a simple problem
> but first it was telling
> > me that the POrder and PTitle were not objects and now when I stripped it
> down to the bare
> > essentials it doesn't seem to verify the form at all.
> >
> >
> > <html>
> > <head>
> > <script language="JavaScript">
> > <!--
> > function check(){
> > var f=document.newreg;
> >
> > if(f.fname.value==""){
> >  alert("Please enter your first name.");
> >  f.fname.focus();
> >  return false;
> >  }
> >
> > if (isNaN(f.POrder.value) == true ){
> >  alert("POrder must contain a number.");
> >  f.POrder.focus();
> >  return false;
> >  }
> > if(f.PTitle.length > 50){
> >  alert("Title must be less than 50 characters.");
> >  f.PTitle.focus();
> >  return false;
> >  }
> >
> >  }
> > file://-->
> > </script>
> >
> > <title>Untitled Document</title>
> > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> > </head>
> >
> > <body bgcolor="#FFFFFF" text="#000000">
> > <form name="form1" method="post" action="hh.asp"
> onSubmit="javascript:return check()">
> >   <p>
> >     <input type="text" name="fname">
> >   </p>
> >   <p>
> >     <input type="text" name="PTitle">
> >   </p>
> >   <p>
> >     <input type="text" name="POrder">
> >   </p>
> >   <p>
> >     <input type="submit" name="Submit" value="Submit">
> >   </p>
> > </form>
> > </body>
> > </html>
> >
> > Regards
> > Oliver Dempsey
> >
> >
> >
> >
> 
> 


  Return to Index