Ivor Paul wrote: > How about removing form tags - just have the field and the observe_field > .... this might not be valid html - not sure about that.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>untitled</title> </head> <body> <div> <label for="test">Test</label><input type="text" name="test" value="" id="test" /> </div> </body> </html> ------------ The above code passes the W3C validator for XHTML 1.0 Strict and XHTML 1.1. Notice that the <div> surrounding the <label> and <input> was necessary to pass XHTML Strict, but was not required for XHTML 1.0 Transitional. Other surrounding tags besides <div> work as well, but the <label> and <input> tags must be contained by something. Example (this is INVALID!): ------------------ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>untitled</title> </head> <body> <label for="test">Test</label><input type="text" name="test" value="" id="test" /> </body> </html> W3C Validator: Line 10, Column 19: document type does not allow element "label" here; missing one of "ins", "del", "h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "address", "fieldset" start-tag. ------------------ -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---