Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: need help


Message #1 by "shiraz" <sheeraz3@y...> on Fri, 22 Mar 2002 02:08:08 +0500
Yes i think u may be rigtht


--- Joe Fawcett <joefawcett@h...> wrote:
> Yes, but how do you get the data then if the form is
> reset without 
> submitting?
> Joe
> 
> 
> >From: "shiraz" <sheeraz3@y...>
> >Reply-To: "javascript" <javascript@p...>
> >To: "javascript" <javascript@p...>
> >Subject: [javascript] Re: need help
> >Date: Mon, 25 Mar 2002 02:13:21 +0500
> >
> >because by doing this the next member can also
> register without pressing 
> >the
> >reset button.
> >
> >----- Original Message -----
> >From: "Joe Fawcett" <joefawcett@h...>
> >To: "javascript" <javascript@p...>
> >Sent: Friday, March 22, 2002 3:47 PM
> >Subject: [javascript] Re: need help
> >
> >
> > > 1) You need .text not .value where you assign
> the occupation variable.
> > > 2) It's probably the isp.close() statement. Try
> closing the document
> > > (isp.document.close();) after writing the text
> and before the confirm
> > > prompt. Why do you reset the form values if they
> agree the data is
> >correct?
> > >
> > > Joe
> > >
> > >
> > > >From: "shiraz" <sheeraz3@y...>
> > > >Reply-To: "javascript"
> <javascript@p...>
> > > >To: "javascript" <javascript@p...>
> > > >Subject: [javascript] need help
> > > >Date: Fri, 22 Mar 2002 02:08:08 +0500
> > > >
> > > >
> > > >Hye:
> > > >  I am trying to make a registration page .i
> this all of the data is
> >stored
> > > >in (one dimention) arrays, when a member fill
> the form and then click 
> >on
> > > >the submit button , a new window will open
> which will show all of the
> > > >entries that was enter by the user. In this
> every thing what i made is
> >fine
> > > >but i have only two problems which i can't
> debug:
> > > >
> > > >1- in the occupation field, the value comes out
> is the index of the
> >option
> > > >box not the text which is placed on that
> index..
> > > >
> > > >2- It give a Runtime error:" OBJECT DOESN'T
> SUPPORT THIS PROPERTY OR
> > > >METHOD" on the statement where I am trying to
> increment P:   p++
> > > >
> > > >
> > > >Given bellow is the code:
> > > >
> > >
> >
>
>***************************************************************************
> >*****
> > > >
> > > >
> > > >
> > > ><html>
> > > >
> > > ><head>
> > > >   <title></title>
> > > >   <SCRIPT language=JavaScript>
> > > >
> > > >var Members=new Array();
> > > >var p=0;
> > > >var
> > >
> >
>
>name="",login="",password="",Confirmpassword="",occupation="",dateofbirth="
>
>",address="",country="",city="",state="",postalcode="",telephone="",fax="",e
> >mail="",nic="";
> > > >var
> > > 
> >
>
>nam,logi="",passwor="",confoasswor="",occupatio="",dateofbirt="",addres="
> >
>
>",countr="",cit="",stat="",postalcod="",telephon="",fa="",emai="",ni="";
> > > >
> > > >
> > > >function IsBlank(s){
> > > >  if(s.charAt(0)=="")
> > > >   return true
> > > >  else
> > > >   return false
> > > >}
> > > >
> > > >function checklength(str){
> > > >var minLength=5;
> > > >  if (str.length < minLength) {
> > > >   alert('Your password must be at least ' +
> minLength + ' characters
> >long.
> > > >Try again.');
> > > >
> > > >  return false;
> > > >
> > > >  }
> > > >return true;
> > > >}
> > > >
> > > >function Validate_Name(str){
> > > >  //var str=document.REG.fname.value;
> > > >  if(IsBlank(str)){
> > > >alert(" the Name field cannot be empty or
> cannot have leading spaces")
> > > >return false
> > > >}
> > > >return true
> > > >}
> > > >
> > > >function Validate_LoginName(str){
> > > >  //var str=document.REG.Blogin.value;
> > > >  if(IsBlank(str)){
> > > >alert("Log-in cannot be empty and cannot have
> leading spaces")
> > > >return false
> > > >}
> > > >return true
> > > >}
> > > >
> > > >function Check_Password(str){
> > > >  //var str=document.REG.pwd.value;
> > > >  if(IsBlank(str)){
> > > >   alert("Password cannot be empty or cannot
> have leading spaces")
> > > >   return false
> > > >  }
> > > >  return true
> > > >}
> > > >
> > > >function Validate_Password(str1,str2){
> > > >  //var str1=document.REG.pwd.value;
> > > >  //var str2=document.REG.conf_pwd.value;
> > > >  if(!(str1==str2)){
> > > >   alert("Password does not matches")
> > > >   return false
> > > >  }
> > > >  return true
> > > >}
> > > >
> > > >function Check_country(str){
> > > >  //var str=document.REG.relg.value;
> > > >  if(IsBlank(str)){
> > > >   alert(" Please enter your Country")
> > > >   return false
> > > >  }
> > > >return true;
> > > >}
> > > >
> > > >function Check_city(str){
> > > >  //var str=document.REG.relg.value;
> > > >  if(IsBlank(str)){
> > > >   alert(" Please enter your City")
> > > >   return false
> > > >  }
> > > >return true;
> > > >}
> > > >
> > > >function Check_postalcode(str){
> > > >  //var str=document.REG.relg.value;
> > > >  if(IsBlank(str)){
> > > >   alert(" Please enter your Postal Code")
> > > >   return false
> > > >  }
> > > >return true;
> > > >}
> > > >
> > > >function Check_state(str){
> > > >  //var str=document.REG.relg.value;
> > > >  if(IsBlank(str)){
> > > >   alert(" Please enter your State")
> > > >   return false
> > > >  }
> > > >return true;
> > > >}
> > > >
> > > >
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

  Return to Index