[Proto-Scripty] Re: Design question for forms
Thanks guys. Now the problems comes when I do select something from the dropdown and it calls the onChange, this does not seem to work. function getTerritories() { $('submittingTerritory').show(); } What should I be doing to make it appear? On Jun 27, 11:53 pm, Jimmy Brake wrote: > Hi, > > It's all about numbers ... do your numbers and figure out if one process > dumping all options for the form is faster for your end users than dumping > the pieces as they need them. > > I have big a cluster(massive processing) but limited bandwidth .. so I would > err on small pieces .. but if you only have one server .. then dumping all > the options would likely be the best solution. > > Jimmy > > On Sat, Jun 27, 2009 at 1:19 AM, T.J. Crowder wrote: > > > > > Hi, > > > The main point of Vladimir's changes being that you cannot put a div > > where you had one (assuming those TRs were inside a TBODY or TABLE), > > it's invalid HTML. IIRC, TABLE can only contain TBODY, THEAD, or > > TFOOT, and TBODY can only contain TR. (Most browsers will insert a > > missing TBODY for you if you leave it out and put TRs directly in a > > TABLE.) Neither TABLE nor TBODY can contain a DIV. The validation > > service[1] can be helpful for this sort of thing. > > > Vladimir also inverted your logic, so it shows something rather than > > hiding it. Whether you want to do that will depend on what you want > > the user experience to be if JavaScript is disabled on the end user's > > browser. > > > [1]http://validator.w3.org/ > > > HTH, > > -- > > T.J. Crowder > > tj / crowder software / com > > Independent Software Engineer, consulting services available > > > On Jun 27, 8:35 am, Vladimir Tkach wrote: > > > Some changes: > > > > > > > > document.observe("dom:loaded", > > > > function(){> if ($('adjType').value.length > 0){ > > > > $('submittingTerritory').show(); > > > > }} > > > > > ); > > > > > > > > > > > ... > > > More HTML > > > ... > > > > > > > > > Other Territory > > > > > > > > > formSelect(' > > > > > otherTerritory', $this- > > > > >shortTerritory, array("onChange"=>"getTerritories()"), array > > > > (""=>"Select a Territory") + $this->shortTerritories) ?> > > > > > > > > > > > > > 2009/6/26 anthony > > > > > I am trying to figure out if I have a dynamic form, whether or not it > > > > is better to make use of many hide & show functions or just Ajax > > > > Updaters and div elements. Let me give you a example of something I > > > > cannot get to work: > > > > > > > > > Event.observe(window,'load',function(){ > > > > if ($('adjType').value == ""){ > > > > $('submittingTerritory').hide(); > > > > }} > > > > > ); > > > > > > > > > > > > > ... > > > > More HTML > > > > ... > > > > > > > > > > > > > > > > Other Territory > > > > > > > > > > > > formSelect('otherTerritory', > > > > $this- > > > > >shortTerritory, array("onChange"=>"getTerritories()"), array > > > > (""=>"Select a Territory") + $this->shortTerritories) ?> > > > > > > > > > > > > > > > > > > When the page loads, I don't want it to show. But it shows anyway. If > > > > I put an alert in that function it works, so I know it s not failing > > > > the if statement. > > > > -- > > > Best Regards, > > > Vladimir Tkach > > > > +972-54-7574166 > > > tea...@gmail.com > > > >http://teamco-anthill.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Design question for forms
Hi, It's all about numbers ... do your numbers and figure out if one process dumping all options for the form is faster for your end users than dumping the pieces as they need them. I have big a cluster(massive processing) but limited bandwidth .. so I would err on small pieces .. but if you only have one server .. then dumping all the options would likely be the best solution. Jimmy On Sat, Jun 27, 2009 at 1:19 AM, T.J. Crowder wrote: > > Hi, > > The main point of Vladimir's changes being that you cannot put a div > where you had one (assuming those TRs were inside a TBODY or TABLE), > it's invalid HTML. IIRC, TABLE can only contain TBODY, THEAD, or > TFOOT, and TBODY can only contain TR. (Most browsers will insert a > missing TBODY for you if you leave it out and put TRs directly in a > TABLE.) Neither TABLE nor TBODY can contain a DIV. The validation > service[1] can be helpful for this sort of thing. > > Vladimir also inverted your logic, so it shows something rather than > hiding it. Whether you want to do that will depend on what you want > the user experience to be if JavaScript is disabled on the end user's > browser. > > [1] http://validator.w3.org/ > > HTH, > -- > T.J. Crowder > tj / crowder software / com > Independent Software Engineer, consulting services available > > On Jun 27, 8:35 am, Vladimir Tkach wrote: > > Some changes: > > > > > > > > document.observe("dom:loaded", > > > > function(){>if ($('adjType').value.length > 0){ > > >$('submittingTerritory').show(); > > >}} > > > > > ); > > > > > > > > > ... > > More HTML > > ... > > > > > >Other Territory > > > > > >formSelect(' > > > > > > > > > otherTerritory', $this- > > > >shortTerritory, array("onChange"=>"getTerritories()"), array > > > (""=>"Select a Territory") + $this->shortTerritories) ?> > > > > > > > > > > > > 2009/6/26 anthony > > > > > > > > > > > > > I am trying to figure out if I have a dynamic form, whether or not it > > > is better to make use of many hide & show functions or just Ajax > > > Updaters and div elements. Let me give you a example of something I > > > cannot get to work: > > > > > > > > Event.observe(window,'load',function(){ > > >if ($('adjType').value == ""){ > > >$('submittingTerritory').hide(); > > >}} > > > > > ); > > > > > > > > > > > ... > > > More HTML > > > ... > > > > > > > > > > > >Other Territory > > > > > > > > >formSelect('otherTerritory', > > > $this- > > > >shortTerritory, array("onChange"=>"getTerritories()"), array > > > (""=>"Select a Territory") + $this->shortTerritories) ?> > > > > > > > > > > > > > > > > When the page loads, I don't want it to show. But it shows anyway. If > > > I put an alert in that function it works, so I know it s not failing > > > the if statement. > > > > -- > > Best Regards, > > Vladimir Tkach > > > > +972-54-7574166 > > tea...@gmail.com > > > > http://teamco-anthill.blogspot.com/ > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Design question for forms
Hi, The main point of Vladimir's changes being that you cannot put a div where you had one (assuming those TRs were inside a TBODY or TABLE), it's invalid HTML. IIRC, TABLE can only contain TBODY, THEAD, or TFOOT, and TBODY can only contain TR. (Most browsers will insert a missing TBODY for you if you leave it out and put TRs directly in a TABLE.) Neither TABLE nor TBODY can contain a DIV. The validation service[1] can be helpful for this sort of thing. Vladimir also inverted your logic, so it shows something rather than hiding it. Whether you want to do that will depend on what you want the user experience to be if JavaScript is disabled on the end user's browser. [1] http://validator.w3.org/ HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Jun 27, 8:35 am, Vladimir Tkach wrote: > Some changes: > > > > document.observe("dom:loaded", > > function(){> if ($('adjType').value.length > 0){ > > $('submittingTerritory').show(); > > }} > > > ); > > > > > ... > More HTML > ... > > > Other Territory > > > formSelect(' > > > > > otherTerritory', $this- > > >shortTerritory, array("onChange"=>"getTerritories()"), array > > (""=>"Select a Territory") + $this->shortTerritories) ?> > > > > > > > 2009/6/26 anthony > > > > > > > I am trying to figure out if I have a dynamic form, whether or not it > > is better to make use of many hide & show functions or just Ajax > > Updaters and div elements. Let me give you a example of something I > > cannot get to work: > > > > > Event.observe(window,'load',function(){ > > if ($('adjType').value == ""){ > > $('submittingTerritory').hide(); > > }} > > > ); > > > > > > > ... > > More HTML > > ... > > > > > > > > Other Territory > > > > > > formSelect('otherTerritory', > > $this- > > >shortTerritory, array("onChange"=>"getTerritories()"), array > > (""=>"Select a Territory") + $this->shortTerritories) ?> > > > > > > > > > > When the page loads, I don't want it to show. But it shows anyway. If > > I put an alert in that function it works, so I know it s not failing > > the if statement. > > -- > Best Regards, > Vladimir Tkach > > +972-54-7574166 > tea...@gmail.com > > http://teamco-anthill.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Design question for forms
Some changes: document.observe("dom:loaded", function(){ >if ($('adjType').value.length > 0){ >$('submittingTerritory').show(); >}} > > ); > > ... More HTML ... Other Territory formSelect(' > > otherTerritory', $this- > >shortTerritory, array("onChange"=>"getTerritories()"), array > (""=>"Select a Territory") + $this->shortTerritories) ?> > > > > > 2009/6/26 anthony > > I am trying to figure out if I have a dynamic form, whether or not it > is better to make use of many hide & show functions or just Ajax > Updaters and div elements. Let me give you a example of something I > cannot get to work: > > > > Event.observe(window,'load',function(){ >if ($('adjType').value == ""){ >$('submittingTerritory').hide(); >}} > > ); > > > > ... > More HTML > ... > > > >Other Territory > > >formSelect('otherTerritory', > $this- > >shortTerritory, array("onChange"=>"getTerritories()"), array > (""=>"Select a Territory") + $this->shortTerritories) ?> > > > > > > When the page loads, I don't want it to show. But it shows anyway. If > I put an alert in that function it works, so I know it s not failing > the if statement. > > > -- Best Regards, Vladimir Tkach +972-54-7574166 tea...@gmail.com http://teamco-anthill.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---