I''m using this form in an edit page to update a person. For some weird reason, when I view this form in the browser... The text field''s value is set to the person''s firstname, but it does not display in the browser. The form works perfectly on Windows (the values are visible in the browser), but not on Ubuntu Linux. I''m using the same environment setup; same Ruby, Rails, and gems versions.. <% form_for @person do |f| %> <label for="person_firstname">First Name</label> <%= text_field :person, :firstname, :class => "textbox", :size => "30%" %> <br /> <%= submit_tag "Update Person", :class => "button button-right" %> <% end %> -- _________________________________ Joshua S. Martin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi Joshua, On Thu, May 13, 2010 at 8:22 PM, Joshua Martin <josmar52789-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> I''m using this form in an edit page to update a person. For some weird > reason, when I view this form in the browser... The text field''s value is > set to the person''s firstname, but it does not display in the browser. > > The form works perfectly on Windows (the values are visible in the > browser), but not on Ubuntu Linux. I''m using the same environment setup; > same Ruby, Rails, and gems versions.. > > <% form_for @person do |f| %> > <label for="person_firstname">First Name</label> <%= text_field > :person, :firstname, :class => "textbox", :size => "30%" %> > <br /> > <%= submit_tag "Update Person", :class => "button button-right" %> > <% end %> > >Without having tested this code my guess is that you''re running into a parser problem. Firefox for Linux is not _exactly_ the same code as Firefox for Windows and the place they differ most is in the parser. You have a class. Move the :size element out of inline styling and into your css and I''d bet a nickle your problem goes away. HTH, Bill -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 14 May 2010 02:22, Joshua Martin <josmar52789-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m using this form in an edit page to update a person. For some weird > reason, when I view this form in the browser... The text field''s value is > set to the person''s firstname, but it does not display in the browser. > > The form works perfectly on Windows (the values are visible in the browser), > but not on Ubuntu Linux. I''m using the same environment setup; same Ruby, > Rails, and gems versions.. > > <% form_for @person do |f| %> > <label for="person_firstname">First Name</label> <%= text_field :person, > :firstname, :class => "textbox", :size => "30%" %> > <br /> > <%= submit_tag "Update Person", :class => "button button-right" %> > <% end %>If you are getting different display in different browsers then it is quite likely you have invalid html. Copy the complete text of the page (View, Page source or simiilar in browser) and paste into the w3c html validator (google will find it). Alternatively install the great html validator plugin for firefox which will check it for you as you develop. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
You might need to keep that nickel Bill (: I''ve removed all the :size elements from the form and validated the page XHTML strict using W3C''s validator. Yet, the values are not displayed. The values are in the HTML, just not being displayed in the text boxes and text area for some reason. On a related note, I have a drop down and it''s value IS set to the object''s attribute. On Fri, May 14, 2010 at 4:04 AM, clanlaw <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 14 May 2010 02:22, Joshua Martin <josmar52789-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I''m using this form in an edit page to update a person. For some weird > > reason, when I view this form in the browser... The text field''s value is > > set to the person''s firstname, but it does not display in the browser. > > > > The form works perfectly on Windows (the values are visible in the > browser), > > but not on Ubuntu Linux. I''m using the same environment setup; same Ruby, > > Rails, and gems versions.. > > > > <% form_for @person do |f| %> > > <label for="person_firstname">First Name</label> <%= text_field > :person, > > :firstname, :class => "textbox", :size => "30%" %> > > <br /> > > <%= submit_tag "Update Person", :class => "button button-right" %> > > <% end %> > > If you are getting different display in different browsers then it is > quite likely you have invalid html. Copy the complete text of the > page (View, Page source or simiilar in browser) and paste into the w3c > html validator (google will find it). Alternatively install the great > html validator plugin for firefox which will check it for you as you > develop. > > Colin > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- _________________________________ Joshua S. Martin CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s), contains information that may be confidential, protected by the attorney client or other legal privileges, and or proprietary non public information. If you are not an intended recipient of this message or an authorized assistant to an intended recipient, please notify the sender by replying to this message and then delete it from your system. Use, dissemination, distribution, or reproduction of this message and or any of its attachments (if any) by unintended recipients is not authorized and may be unlawful. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 14 May 2010 14:08, Joshua Martin <josmar52789-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> You might need to keep that nickel Bill (: > > I''ve removed all the :size elements from the form and validated the page > XHTML strict using W3C''s validator. > > Yet, the values are not displayed. The values are in the HTML, just not > being displayed in the text boxes and text area for some reason. On a > related note, I have a drop down and it''s value IS set to the object''s > attribute.Could you put the (complete) html somewhere so we can have a look? Strip out everything you can first. Colin> > > On Fri, May 14, 2010 at 4:04 AM, clanlaw <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> >> On 14 May 2010 02:22, Joshua Martin <josmar52789-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > I''m using this form in an edit page to update a person. For some weird >> > reason, when I view this form in the browser... The text field''s value >> > is >> > set to the person''s firstname, but it does not display in the browser. >> > >> > The form works perfectly on Windows (the values are visible in the >> > browser), >> > but not on Ubuntu Linux. I''m using the same environment setup; same >> > Ruby, >> > Rails, and gems versions.. >> > >> > <% form_for @person do |f| %> >> > <label for="person_firstname">First Name</label> <%= text_field >> > :person, >> > :firstname, :class => "textbox", :size => "30%" %> >> > <br /> >> > <%= submit_tag "Update Person", :class => "button button-right" %> >> > <% end %> >> >> If you are getting different display in different browsers then it is >> quite likely you have invalid html. Copy the complete text of the >> page (View, Page source or simiilar in browser) and paste into the w3c >> html validator (google will find it). Alternatively install the great >> html validator plugin for firefox which will check it for you as you >> develop. >> >> Colin >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > > > -- > _________________________________ > > Joshua S. Martin > > > CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s), > contains information that may be confidential, protected by the attorney > client or other legal privileges, and or proprietary non public information. > If you are not an intended recipient of this message or an authorized > assistant to an intended recipient, please notify the sender by replying to > this message and then delete it from your system. Use, dissemination, > distribution, or reproduction of this message and or any of its attachments > (if any) by unintended recipients is not authorized and may be unlawful. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I feel quite stupid now.. Apparently, I had some JQuery for a search textbox whose job involved incorrectly blanking out all input:text in the page... Didn''t realize it until I simplified the page as much as possible. Definitely won''t make this mistake again (: On Fri, May 14, 2010 at 9:25 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 14 May 2010 14:08, Joshua Martin <josmar52789-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > You might need to keep that nickel Bill (: > > > > I''ve removed all the :size elements from the form and validated the page > > XHTML strict using W3C''s validator. > > > > Yet, the values are not displayed. The values are in the HTML, just not > > being displayed in the text boxes and text area for some reason. On a > > related note, I have a drop down and it''s value IS set to the object''s > > attribute. > > Could you put the (complete) html somewhere so we can have a look? > Strip out everything you can first. > > Colin > > > > > > > On Fri, May 14, 2010 at 4:04 AM, clanlaw <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > >> > >> On 14 May 2010 02:22, Joshua Martin <josmar52789-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> > I''m using this form in an edit page to update a person. For some weird > >> > reason, when I view this form in the browser... The text field''s value > >> > is > >> > set to the person''s firstname, but it does not display in the browser. > >> > > >> > The form works perfectly on Windows (the values are visible in the > >> > browser), > >> > but not on Ubuntu Linux. I''m using the same environment setup; same > >> > Ruby, > >> > Rails, and gems versions.. > >> > > >> > <% form_for @person do |f| %> > >> > <label for="person_firstname">First Name</label> <%= text_field > >> > :person, > >> > :firstname, :class => "textbox", :size => "30%" %> > >> > <br /> > >> > <%= submit_tag "Update Person", :class => "button button-right" %> > >> > <% end %> > >> > >> If you are getting different display in different browsers then it is > >> quite likely you have invalid html. Copy the complete text of the > >> page (View, Page source or simiilar in browser) and paste into the w3c > >> html validator (google will find it). Alternatively install the great > >> html validator plugin for firefox which will check it for you as you > >> develop. > >> > >> Colin > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups > >> "Ruby on Rails: Talk" group. > >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >> To unsubscribe from this group, send email to > >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > >> For more options, visit this group at > >> http://groups.google.com/group/rubyonrails-talk?hl=en. > >> > > > > > > > > -- > > _________________________________ > > > > Joshua S. Martin > > > > > > CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s), > > contains information that may be confidential, protected by the attorney > > client or other legal privileges, and or proprietary non public > information. > > If you are not an intended recipient of this message or an authorized > > assistant to an intended recipient, please notify the sender by replying > to > > this message and then delete it from your system. Use, dissemination, > > distribution, or reproduction of this message and or any of its > attachments > > (if any) by unintended recipients is not authorized and may be unlawful. > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > > For more options, visit this group at > > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- _________________________________ Joshua S. Martin CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s), contains information that may be confidential, protected by the attorney client or other legal privileges, and or proprietary non public information. If you are not an intended recipient of this message or an authorized assistant to an intended recipient, please notify the sender by replying to this message and then delete it from your system. Use, dissemination, distribution, or reproduction of this message and or any of its attachments (if any) by unintended recipients is not authorized and may be unlawful. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
That would do it. Meanwhile, if you are using form_for, you should do this: <%= f.text_field :first_name %> The f knows it refers to the person record because you told it so with form_for... On May 14, 9:50 am, Joshua Martin <josmar52...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I feel quite stupid now.. Apparently, I had some JQuery for a search textbox > whose job involved incorrectly blanking out all input:text in the page... > Didn''t realize it until I simplified the page as much as possible. > > Definitely won''t make this mistake again (: > > > > On Fri, May 14, 2010 at 9:25 AM, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > On 14 May 2010 14:08, Joshua Martin <josmar52...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > You might need to keep that nickel Bill (: > > > > I''ve removed all the :size elements from the form and validated the page > > > XHTML strict using W3C''s validator. > > > > Yet, the values are not displayed. The values are in the HTML, just not > > > being displayed in the text boxes and text area for some reason. On a > > > related note, I have a drop down and it''s value IS set to the object''s > > > attribute. > > > Could you put the (complete) html somewhere so we can have a look? > > Strip out everything you can first. > > > Colin > > > > On Fri, May 14, 2010 at 4:04 AM, clanlaw <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > >> On 14 May 2010 02:22, Joshua Martin <josmar52...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >> > I''m using this form in an edit page to update a person. For some weird > > >> > reason, when I view this form in the browser... The text field''s value > > >> > is > > >> > set to the person''s firstname, but it does not display in the browser. > > > >> > The form works perfectly on Windows (the values are visible in the > > >> > browser), > > >> > but not on Ubuntu Linux. I''m using the same environment setup; same > > >> > Ruby, > > >> > Rails, and gems versions.. > > > >> > <% form_for @person do |f| %> > > >> > <label for="person_firstname">First Name</label> <%= text_field > > >> > :person, > > >> > :firstname, :class => "textbox", :size => "30%" %> > > >> > <br /> > > >> > <%= submit_tag "Update Person", :class => "button button-right" %> > > >> > <% end %> > > > >> If you are getting different display in different browsers then it is > > >> quite likely you have invalid html. Copy the complete text of the > > >> page (View, Page source or simiilar in browser) and paste into the w3c > > >> html validator (google will find it). Alternatively install the great > > >> html validator plugin for firefox which will check it for you as you > > >> develop. > > > >> Colin > > > >> -- > > >> You received this message because you are subscribed to the Google > > Groups > > >> "Ruby on Rails: Talk" group. > > >> To post to this group, send email to rubyonrails-talk@googlegroups.com. > > >> To unsubscribe from this group, send email to > > >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > > . > > >> For more options, visit this group at > > >>http://groups.google.com/group/rubyonrails-talk?hl=en. > > > > -- > > > _________________________________ > > > > Joshua S. Martin > > > > CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s), > > > contains information that may be confidential, protected by the attorney > > > client or other legal privileges, and or proprietary non public > > information. > > > If you are not an intended recipient of this message or an authorized > > > assistant to an intended recipient, please notify the sender by replying > > to > > > this message and then delete it from your system. Use, dissemination, > > > distribution, or reproduction of this message and or any of its > > attachments > > > (if any) by unintended recipients is not authorized and may be unlawful. > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Ruby on Rails: Talk" group. > > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm. > > > To unsubscribe from this group, send email to > > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > > . > > > For more options, visit this group at > > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- > _________________________________ > > Joshua S. Martin > > CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s), > contains information that may be confidential, protected by the attorney > client or other legal privileges, and or proprietary non public information. > If you are not an intended recipient of this message or an authorized > assistant to an intended recipient, please notify the sender by replying to > this message and then delete it from your system. Use, dissemination, > distribution, or reproduction of this message and or any of its attachments > (if any) by unintended recipients is not authorized and may be unlawful. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.