From: jr on 29 Jul 2010 15:18 On Jul 29, 10:30 am, Denis McMahon <denis.m.f.mcma...(a)googlemail.com> wrote: > On 29/07/10 05:50, jr wrote: > > > Something is not working on the validation script. ... > > but then I got a syntax error. thanks, > > What was the error message, and what line in the script did it identify? > > Rgds > > Denis McMahon I believe I this one does work. I was testing on the wrong page or something else. It is not elegant but it works.
From: jr on 29 Jul 2010 15:21 On Jul 29, 6:23 am, SAM <stephanemoriaux.NoAd...(a)wanadoo.fr.invalid> wrote: > Le 7/29/10 6:50 AM, jr a écrit : > > > Something is not working on the validation script. The bu is > > required in a search form. Zonenm and zoneid are required together. > > aren't you too tired to always ask the same thing ? > > can't you think by yourself ? > > if ( bu.value ) { > if ( zoneid.value && !zonenum.value ) { blah 1 } > else > if ( !zoneid.value && zonenum.value ) { blah 2 } > } > else { blah 0 } > > the "blah"s must return false > > -- > sm I'm sorry I figured it out. Yours is better but the other one works. I need to read a Javascript book. I have done hardly any javascript and the format is slightly different than php.
From: SAM on 29 Jul 2010 17:21 Le 7/29/10 9:21 PM, jr a �crit : > On Jul 29, 6:23 am, SAM <stephanemoriaux.NoAd...(a)wanadoo.fr.invalid> > wrote: >> Le 7/29/10 6:50 AM, jr a �crit : >> >>> Something is not working on the validation script. The bu is >>> required in a search form. Zonenm and zoneid are required together. >> >> can't you think by yourself ? >> >> if ( bu.value ) { >> if ( zoneid.value && !zonenum.value ) { blah 1 } >> else >> if ( !zoneid.value && zonenum.value ) { blah 2 } >> } >> else { blah 0 } >> >> the "blah"s must return false >> > I'm sorry I figured it out. Yours is better but the other one works. > I need to read a Javascript book. I have done hardly any javascript > and the format is slightly different than php. not so much ... not so much ... if / else are the same everywhere ;-) -- sm
From: David Mark on 29 Jul 2010 18:39 On Jul 29, 5:21 pm, SAM <stephanemoriaux.NoAd...(a)wanadoo.fr.invalid> wrote: > Le 7/29/10 9:21 PM, jr a écrit : > > > > > > > On Jul 29, 6:23 am, SAM <stephanemoriaux.NoAd...(a)wanadoo.fr.invalid> > > wrote: > >> Le 7/29/10 6:50 AM, jr a écrit : > > >>> Something is not working on the validation script. The bu is > >>> required in a search form. Zonenm and zoneid are required together.. > > >> can't you think by yourself ? > > >> if ( bu.value ) { > >> if ( zoneid.value && !zonenum.value ) { blah 1 } > >> else > >> if ( !zoneid.value && zonenum.value ) { blah 2 } > >> } > >> else { blah 0 } > > >> the "blah"s must return false > > > I'm sorry I figured it out. Yours is better but the other one works. > > I need to read a Javascript book. I have done hardly any javascript > > and the format is slightly different than php. > > not so much ... not so much ... if / else are the same everywhere ;-) > Pretty much and you don't need an else if the previous conditional clause exits the function. JSLint is good for spotting these issues.
From: SAM on 30 Jul 2010 14:27 Le 7/30/10 12:39 AM, David Mark a �crit : > On Jul 29, 5:21 pm, SAM <stephanemoriaux.NoAd...(a)wanadoo.fr.invalid> > wrote: >>>> if ( bu.value ) { >>>> if ( zoneid.value && !zonenum.value ) { blah 1 } >>>> else >>>> if ( !zoneid.value && zonenum.value ) { blah 2 } >>>> } >>>> else { blah 0 } >>>> the "blah"s must return false >>> I'm sorry I figured it out. Yours is better but the other one works. >>> I need to read a Javascript book. I have done hardly any javascript >>> and the format is slightly different than php. >> not so much ... not so much ... if / else are the same everywhere ;-) > > Pretty much and you don't need an else if the previous conditional > clause exits the function. Absolutely ! (posted too quickly :-( ) -- sm
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: A "does global variable exist" function Next: solutions manual |