[Rails] Re: How to initially hide a drop-down control and have an image control make it visible

2010-03-23 Thread RichardOnRails
Hi Hassan, please take a look at my reply to Michael. On Mar 22, 6:11 pm, Hassan Schroeder wrote: > On Mon, Mar 22, 2010 at 2:51 PM, RichardOnRails > > wrote: > > Thanks for joining the conversation.  I ran my the HTML page which was > > generated by my .erb.  I had a form_for with an embedded d

[Rails] Re: How to initially hide a drop-down control and have an image control make it visible

2010-03-23 Thread RichardOnRails
Great response, Michael. I now have a clean validation on the compiled code, but I've still got a problem. I've got clean code that validates. http://www.pastie.org/882256 displays: - new.html.erb - HTML generated for new.html.erb - Validation for generated html, which has one spurious (IMHO) war

Re: [Rails] Re: How to initially hide a drop-down control and have an image control make it visible

2010-03-22 Thread Hassan Schroeder
On Mon, Mar 22, 2010 at 2:51 PM, RichardOnRails wrote: > Thanks for joining the conversation.  I ran my the HTML page which was > generated by my .erb.  I had a form_for with an embedded div and the > HTML page had an embedded div.  W3C didn't like it.  The details are > at http://www.pastie.org/

Re: [Rails] Re: How to initially hide a drop-down control and have an image control make it visible

2010-03-22 Thread Michael Pavling
On 22 March 2010 21:51, RichardOnRails wrote: > Hi Hassan, > > Thanks for joining the conversation.  I ran my the HTML page which was > generated by my .erb.  I had a form_for with an embedded div and the > HTML page had an embedded div.  W3C didn't like it.  The details are > at http://www.pastie

[Rails] Re: How to initially hide a drop-down control and have an image control make it visible

2010-03-22 Thread RichardOnRails
Hi Hassan, Thanks for joining the conversation. I ran my the HTML page which was generated by my .erb. I had a form_for with an embedded div and the HTML page had an embedded div. W3C didn't like it. The details are at http://www.pastie.org/881730. Now that I look at it again, perhaps the Obj

Re: [Rails] Re: How to initially hide a drop-down control and have an image control make it visible

2010-03-22 Thread Hassan Schroeder
On Mon, Mar 22, 2010 at 1:35 PM, RichardOnRails wrote: > Your "how's the HTML" question really did the job: > tag not allowed within the scope of a tag. What gives you that idea? It's simply not true. -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan -

[Rails] Re: How to initially hide a drop-down control and have an image control make it visible

2010-03-22 Thread RichardOnRails
Hey Colin, Your "how's the HTML" question really did the job: tag not allowed within the scope of a tag. Which means the my .erb can't have: <% form_for(@expense) do |f| %> [snip] <%= select_tag "test", options_for_select(@current_vendors.collect { |v| v.nickname

Re: [Rails] Re: How to initially hide a drop-down control and have an image control make it visible

2010-03-21 Thread Colin Law
On 21 March 2010 10:49, RichardOnRails wrote: > Hi Colin, > > Your "check the HTML" tip is *great* ... it's now in my debugging > arsenal. Another tip is to install the Html Validator add-on to Firefox and it will automatically validate your pages as you develop, this often shows up the reason wh

[Rails] Re: How to initially hide a drop-down control and have an image control make it visible

2010-03-21 Thread RichardOnRails
Hi Colin, Your "check the HTML" tip is *great* ... it's now in my debugging arsenal. > comma missing That was a tip on my img-base code. I'll get back to that because I like the down-arrow image better that ShowList button version, which is close to working. My last next-to-last problem in this

Re: [Rails] Re: How to initially hide a drop-down control and have an image control make it visible

2010-03-21 Thread Colin Law
On 21 March 2010 05:02, RichardOnRails wrote: > OK,  I got rid of all the syntax errors. > The vendor_drop list is now hidden on startup of the view > I switched from an image to a button > However, the drop list does not get displayed when the ShowList button > is clicked > Code is below.  Ideas

[Rails] Re: How to initially hide a drop-down control and have an image control make it visible

2010-03-20 Thread RichardOnRails
OK, I got rid of all the syntax errors. The vendor_drop list is now hidden on startup of the view I switched from an image to a button However, the drop list does not get displayed when the ShowList button is clicked Code is below. Ideas are most welcome <%= button_to_function("ShowList", %

[Rails] Re: How to initially hide a drop-down control and have an image control make it visible

2010-03-20 Thread RichardOnRails
I think I improved two things in the version of lines 20-26 below: 1. I gave the div an id rather than a name 2. I gave the div a style of "display:none" so that it's hidden at every startup of the view <%# = image_tag "DownArrow.jpg" options = { onclick=page["vendor_droplist"].show } %>

[Rails] Re: How to initially hide a drop-down control and have an image control make it visible

2010-03-20 Thread RichardOnRails
I think I corrected the div by: 1. giving it an id rather than a name 2. adding display:none to start it off hidden as follows: <%# = image_tag "DownArrow.jpg" options = { onclick=page["vendor_droplist"].show } %> <%= select_tag "test", options_for_select(@curre