[Rails] Re: dynamic form problem

2009-09-28 Thread Jedrin
>> Are you using Firebug? If not, stop, get it, use it. >> And it would be useful if you either posted the app somewhere public >> or created a downloadable test case that demonstrates the issue. I have been using firebug, I thought at times in the past there was a 'break on javascript error' o

[Rails] Re: dynamic form problem

2009-09-26 Thread Marnen Laibow-Koser
Greg Donald wrote: > On Fri, Sep 25, 2009 at 4:37 PM, Jedrin wrote: >> try. Having empty tags in the > > Empty tags is invalid HTML. No it's not. Check with the W3C validator. It has no problem with > Use a non-breaking space   or > something similar to make it valid. That's no more or

[Rails] Re: dynamic form problem

2009-09-26 Thread Greg Donald
On Fri, Sep 25, 2009 at 5:49 PM, Hassan Schroeder wrote: > I assumed the OP meant "empty" Yeah, typo, I usually do something like   -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

[Rails] Re: dynamic form problem

2009-09-25 Thread Hassan Schroeder
On Fri, Sep 25, 2009 at 3:25 PM, Greg Donald wrote: > > On Fri, Sep 25, 2009 at 4:37 PM, Jedrin wrote: >> try. Having empty tags in the > > Empty tags is invalid HTML.  Use a non-breaking space   or > something similar to make it valid. > >   ?? I assumed the OP meant "empty" but what you pr

[Rails] Re: dynamic form problem

2009-09-25 Thread Greg Donald
On Fri, Sep 25, 2009 at 4:37 PM, Jedrin wrote: > try. Having empty tags in the Empty tags is invalid HTML. Use a non-breaking space   or something similar to make it valid.   -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this messa

[Rails] Re: dynamic form problem

2009-09-25 Thread Hassan Schroeder
On Fri, Sep 25, 2009 at 2:37 PM, Jedrin wrote: > >  Maybe what it is is I can't generate any or tags in my > partial that renders the ajax stuff. If any empty ones I have won't > show as a row until I render into them, maybe that is what I should > try. Having empty tags in the original and t

[Rails] Re: dynamic form problem

2009-09-25 Thread Jedrin
Maybe what it is is I can't generate any or tags in my partial that renders the ajax stuff. If any empty ones I have won't show as a row until I render into them, maybe that is what I should try. Having empty tags in the original and then render into the inside of them with ajax .. I'm guess

[Rails] Re: dynamic form problem

2009-09-25 Thread Jedrin
I didn't quite understand what you meant. However, this whole approach is having numerous problems, though I did get an rjs focus to work. I'm not sure if it's because there is a table inside the form, but the basic thing is I want to change form fields using ajax. If you have a some text fiel

[Rails] Re: dynamic form problem

2009-09-25 Thread Hassan Schroeder
On Fri, Sep 25, 2009 at 9:29 AM, Jedrin wrote: > I don't suppose there is any easy way to tell what the focus was when > observe_form sends the call to the server ? Uh, the suggestion in my previous message? :-) -- Hassan Schroeder hassan.schroe...@gmail.com twitter:

[Rails] Re: dynamic form problem

2009-09-25 Thread Jedrin
That seems to work, thanks alot, things are looking a little better now. I don't suppose there is any easy way to tell what the focus was when observe_form sends the call to the server ? Right now I just keep the fields in a session and see which one changed, which is sort of a hack and prone t

[Rails] Re: dynamic form problem

2009-09-25 Thread bill walton
Hi Jedrin, On Fri, 2009-09-25 at 08:04 -0700, Jedrin wrote: > Is there a way to focus through RJS ? page['element_id'].focus() Best regards, Bill --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Ta

[Rails] Re: dynamic form problem

2009-09-25 Thread Jedrin
Since I rerender the form using ajax, I am not sure if document.myform.myfield.focus() will work and I have not had any luck. Is there a way to focus through RJS ? The best approach I can think of is to get rid of the form and have a field observer for each field, save the values in a session an

[Rails] Re: dynamic form problem

2009-09-24 Thread Hassan Schroeder
On Thu, Sep 24, 2009 at 2:11 PM, Jedrin wrote: >  Actually, the problem with re rendering the form and setting the > focus is knowing what the focus was before observe_form sent the > request to the server. The most obvious hack way is to keep the form > values in a session and see which one cha

[Rails] Re: dynamic form problem

2009-09-24 Thread Jedrin
Actually, the problem with re rendering the form and setting the focus is knowing what the focus was before observe_form sent the request to the server. The most obvious hack way is to keep the form values in a session and see which one changed since the last time. That might work if the duratio