Guys, One simple question.. I am creating some elements using javascript .. Even they are working fine as well as i am giving them name and ids.. But when i click submit button these parameters are not coming in the passing hash .. Can it happen .. ? Wasted much time but no solution.. May be you guyz can help me out .. -- Posted via http://www.ruby-forum.com/.
On Tue, Sep 22, 2009 at 4:18 AM, Hemant Bhargava <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > May be you guyz can help me out ..Not without a heck of a lot more detail... -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan
Ok.. The thing is i am adding a new tailor and adding his phone number. Now if he has more than one number then he have to create a text box himself by clicking on add more phone number. Now If he clicked text box is created. Even in firefox i had seen that id and names are there what i want.. But when i commit my page i mean when i add that tailor .. These javascript created elements are not passing to next page .. Hope you people got my problem .. :) Hassan Schroeder wrote:> On Tue, Sep 22, 2009 at 4:18 AM, Hemant Bhargava > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >>-- Posted via http://www.ruby-forum.com/.
Anybody listening me .. ? Hemant Bhargava wrote:> Ok.. > > The thing is i am adding a new tailor and adding his phone number. Now > if he has more than one number then he have to create a text box himself >-- Posted via http://www.ruby-forum.com/.
On Sep 24, 10:28 am, Hemant Bhargava <rails-mailing-l...@andreas- s.net> wrote:> Anybody listening me .. ? >You''re still being quite vague. In no particular order: check that the parameters aren''t there but under a different name, check that the fields you add are inside the form and if these fields have the same name as existing fields on the page then make sure you understand the info at http://guides.rubyonrails.org/form_helpers.html#understanding-parameter-naming-conventions Fred> Hemant Bhargava wrote: > > Ok.. > > > The thing is i am adding a new tailor and adding his phone number. Now > > if he has more than one number then he have to create a text box himself > > -- > Posted viahttp://www.ruby-forum.com/.
Thats Ok, I am creating the elements inside the form only. I can see this in firebug as well. Also about naming convention, I am naming them as tailor_phone, tailor_phone0, tailor_phone1.. I think these are all different variables. Correct.. And these variable names are unique to the page. What else .. ? Frederick Cheung wrote:> You''re still being quite vague. In no particular order: check that the > parameters aren''t there but under a different name, check that the > fields you add are inside the form and if these fields have the same > name as existing fields on the page then make sure you understand the > info at > http://guides.rubyonrails.org/form_helpers.html#understanding-parameter-naming-conventions > > Fred-- Posted via http://www.ruby-forum.com/.
2009/9/24 Hemant Bhargava <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > Thats Ok, > I am creating the elements inside the form only. I can see this in > firebug as well. Also about naming convention, I am naming them as > tailor_phone, tailor_phone0, tailor_phone1.. I think these are all > different variables. Correct.. And these variable names are unique to > the page. What else .. ? >Have you tried copying the html out of the browser View Page source and pasting into the w3c html validator web site? If it is not valid html then strange things happen. Colin> > Frederick Cheung wrote: >> You''re still being quite vague. In no particular order: check that the >> parameters aren''t there but under a different name, check that the >> fields you add are inside the form and if these fields have the same >> name as existing fields on the page then make sure you understand the >> info at >> http://guides.rubyonrails.org/form_helpers.html#understanding-parameter-naming-conventions >> >> Fred > > -- > Posted via http://www.ruby-forum.com/. > > > >
Colin Law wrote: Man this validator is giving me "469 Errors, 346 warning(s)". What crap is this?> > Have you tried copying the html out of the browser View Page source > and pasting into the w3c html validator web site? If it is not valid > html then strange things happen. > > Colin-- Posted via http://www.ruby-forum.com/.
On Sep 24, 12:19 pm, Hemant Bhargava <rails-mailing-l...@andreas- s.net> wrote:> Colin Law wrote: > > Man this validator is giving me "469 Errors, 346 warning(s)". What crap > is this? >It''s more likely that the validator is correct and that you have a lot of invalid html. Fred> > > > Have you tried copying the html out of the browser View Page source > > and pasting into the w3c html validator web site? If it is not valid > > html then strange things happen. > > > Colin > > -- > Posted viahttp://www.ruby-forum.com/.
Can you paste your code? -- Posted via http://www.ruby-forum.com/.
2009/9/24 Hemant Bhargava <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > Man this validator is giving me "469 Errors, 346 warning(s)". What crap > is this? >Well you wrote it. Colin>> >> Have you tried copying the html out of the browser View Page source >> and pasting into the w3c html validator web site? If it is not valid >> html then strange things happen. >> >> Colin > > -- > Posted via http://www.ruby-forum.com/. > > > >
> 2009/9/24 Hemant Bhargava <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>: > > > > Man this validator is giving me "469 Errors, 346 warning(s)". What crap > > is this? > > > >Sorry, couldn''t resist to reply with a big smile on my face ;) hehe.... --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Champs, I have following errors now after validating by w3.org :) My first two lines are of application is:- <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"> And the errors are:- ------------------- # Line 1, Column 121: DTD did not contain element declaration for document type name …/xhtml1/DTD/xhtml1-transitional.dtd"> ✉ A DOCTYPE declares the version of the language used, as well as what the root (top) element of your document will be. For example, if the top element of your document is <html>, the DOCTYPE declaration will look like: "<!DOCTYPE html". In most cases, it is safer not to type or edit the DOCTYPE declaration at all, and preferable to let a tool include it, or copy and paste it from a trusted list of DTDs. # Error Line 2, Column 67: document type does not allow element "html" here …n" xmlns="http://www.w3.org/1999/xhtml" lang="en"> ✉ The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed). One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML''s rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML''s "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error). # Error Line 4, Column 70: end tag for "meta" omitted, but OMITTAG NO was specified … content="text/html; charset=UTF-… ✉ You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">". # Info Line 4, Column 2: start tag was here <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> --------------- There are also some more errors for label. In source code .. I mean when i view page source labels are of type:- td> <div class="one_element_div_qual" id="one_element_div_qual_37" onclick="changeBackgroundColor(this.id);"> <label for="FRCA"> <input type="checkbox" id="qual_checkbox_37" name="qualification_ids[]" value="37" /> FRCA </label> </div> And this code is also giving me error.. The error is- --------- reference to non-existent ID "FRCA" <label for="FRCA"> ✉ This error can be triggered by: * A non-existent input, select or textarea element * A missing id attribute * A typographical error in the id attribute Try to check the spelling and case of the id you are referring to. ---------- Can you guyz tell me why these errors are coming .. Martijn van Rheenen wrote:>> 2009/9/24 Hemant Bhargava <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:-- Posted via http://www.ruby-forum.com/.
First of all, as XML is case sensitive, I would change this: <!DOCTYPE HTML PUBLIC... <html> to this: <!DOCTYPE html PUBLIC... <html> See what errors are still found after that. (btw: this is more a html / xml related question than a RubyOnRails-related issue, just to be clear) --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Martijn van Rheenen wrote: Yups this was one issue .. Lot of erros gone .. But still left from above code i had written .. Declared an form like this also giving me error .. <% form_tag ''/doctors/create'', :method => ''post'' do -%> <% end %> Why so champs..> First of all, as XML is case sensitive, I would change this: > > <!DOCTYPE HTML PUBLIC... > <html> > > to this: > > <!DOCTYPE html PUBLIC... > <html> > > See what errors are still found after that. > (btw: this is more a html / xml related question than a > RubyOnRails-related > issue, just to be clear)-- Posted via http://www.ruby-forum.com/.
2009/9/24 Hemant Bhargava <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:>> There are also some more errors for label. > In source code .. I mean when i view page source labels are of type:- > td> > > <div class="one_element_div_qual" id="one_element_div_qual_37" > onclick="changeBackgroundColor(this.id);"> > <label for="FRCA"> > <input type="checkbox" id="qual_checkbox_37" > name="qualification_ids[]" value="37" /> > FRCA > </label> > </div> > > And this code is also giving me error.. The error is- > --------- > reference to non-existent ID "FRCA" > > <label for="FRCA"> >The label for="FRCA" is expecting to find an object with id FRCA that this is the label for. Is it usual to have an input inside a label? Did you mean <label for="qual_checkbox_37">FRCA</label> <input ... /> Colin
Ok thanks a lot for your replies, Just about to finish it with a big smile on my face ..:) <input type="button" name="adddynamicBox_<%= day %>" id="adddynamicBox_<%= day %>" value="Add Schedule" onclick="addScheduleRow(''<%= day %>'', <%= index %>, [<%= time_slot_array.join(", ") %>], [<%= clinic_id_array.join(", ") %>], [''<%= clinic_name_array.join("'', ''") %>'']) " /> And this line is giving me error:- ---- XML Parsing Error: xmlParseEntityRef: no name …="adddynamicBox_Mon" id="adddynamicBox_Mon" value="Add Schedule" onclick="add… -- I had given name also rit.. Then why error is coming.. Also i am passing a name to javascript function which has "&" in it. Is there any way to decode it as well.> Did you mean > <label for="qual_checkbox_37">FRCA</label> > <input ... /> > > Colin-- Posted via http://www.ruby-forum.com/.
On Sep 25, 7:00 am, Hemant Bhargava <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Ok thanks a lot for your replies, > Just about to finish it with a big smile on my face ..:) > > <input type="button" name="adddynamicBox_<%= day %>" > id="adddynamicBox_<%= day %>" value="Add Schedule" > onclick="addScheduleRow(''<%= day %>'', <%= index %>, [<%> time_slot_array.join(", ") %>], [<%= clinic_id_array.join(", ") %>], > [''<%= clinic_name_array.join("'', ''") %>'']) " /> > > And this line is giving me error:- > ---- > XML Parsing Error: xmlParseEntityRef: no name > …="adddynamicBox_Mon" id="adddynamicBox_Mon" value="Add Schedule" > onclick="add… > -- > > I had given name also rit.. Then why error is coming.. > > Also i am passing a name to javascript function which has "&" in it. Is > there any way to decode it as well. >without seeing the generated html it is only a guess but & characters need to be escaped. F> > Did you mean > > <label for="qual_checkbox_37">FRCA</label> > > <input ... /> > > > Colin > > -- > Posted viahttp://www.ruby-forum.com/.
2009/9/25 Hemant Bhargava <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > Ok thanks a lot for your replies, > Just about to finish it with a big smile on my face ..:) > > <input type="button" name="adddynamicBox_<%= day %>" > id="adddynamicBox_<%= day %>" value="Add Schedule" > onclick="addScheduleRow(''<%= day %>'', <%= index %>, [<%> time_slot_array.join(", ") %>], [<%= clinic_id_array.join(", ") %>], > [''<%= clinic_name_array.join("'', ''") %>'']) " /> > > And this line is giving me error:- > ---- > XML Parsing Error: xmlParseEntityRef: no name > …="adddynamicBox_Mon" id="adddynamicBox_Mon" value="Add Schedule" > onclick="add… > -- > > I had given name also rit.. Then why error is coming..Can we see the html please, with a bit either side of the error. Colin> > Also i am passing a name to javascript function which has "&" in it. Is > there any way to decode it as well. > > >> Did you mean >> <label for="qual_checkbox_37">FRCA</label> >> <input ... /> >> >> Colin > > -- > Posted via http://www.ruby-forum.com/. > > > >
<td class="new_doctor_button"> <input type="button" name="adddynamicBox_Mon" id="adddynamicBox_Mon" value="Add Schedule" onclick="addScheduleRow(''Mon'', 1, [700, 730, 800, 830, 900, 930, 1000, 1030, 1100, 1130, 1200, 1230, 1300, 1330, 1400, 1430, 1500, 1530, 1600, 1630, 1700, 1730, 1800, 1830, 1900, 1930, 2000, 2030, 2100], [8, 9, 12, 6, 10, 1, 11, 2, 5, 13, 3, 7, 4], [''Crowns & Ridges'', ''Millenium''] /> </td> This is HTML which is generated by the above written code .. Giving me error that--And this line is giving me error:- ---- XML Parsing Error: xmlParseEntityRef: no name …="adddynamicBox_Mon" id="adddynamicBox_Mon" value="Add Schedule" onclick="add… ----------> Can we see the html please, with a bit either side of the error. > > Colin-- Posted via http://www.ruby-forum.com/.
2009/9/25 Hemant Bhargava <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > <td class="new_doctor_button"> > <input type="button" name="adddynamicBox_Mon" > id="adddynamicBox_Mon" value="Add Schedule" > onclick="addScheduleRow(''Mon'', 1, [700, 730, 800, 830, 900, 930, 1000, > 1030, 1100, 1130, 1200, 1230, 1300, 1330, 1400, 1430, 1500, 1530, 1600, > 1630, 1700, 1730, 1800, 1830, 1900, 1930, 2000, 2030, 2100], [8, 9, 12, > 6, 10, 1, 11, 2, 5, 13, 3, 7, 4], [''Crowns & Ridges'', ''Millenium''] /> > </td>Is there )" missing? Colin> This is HTML which is generated by the above written code .. > Giving me error that--And this line is giving me error:- > ---- > XML Parsing Error: xmlParseEntityRef: no name > …="adddynamicBox_Mon" id="adddynamicBox_Mon" value="Add Schedule" > onclick="add… > ---------- > >> Can we see the html please, with a bit either side of the error. >> >> Colin > > -- > Posted via http://www.ruby-forum.com/. > > > >
Forgot to write here .. Its in mine source code ..:) Champs its 2 days since i started my problem .. Still not getting out of this rid. Neways thanks to all of you with smile who posted replies.:)> Is there )" missing? > > Colin-- Posted via http://www.ruby-forum.com/.
2009/9/25 Hemant Bhargava <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > Forgot to write here .. > Its in mine source code ..:) > Champs its 2 days since i started my problem .. Still not getting out of > this rid. Neways thanks to all of you with smile who posted replies.:)Are you sure it is in the code? I see it is in the code you posted earlier, are you sure it is still there? If so then play about with the source code a bit in that area to work out what is happening. Don''t worry about whether it is valid html for the moment just try to work out why the html does not line up with the source. Maybe put some extra characters in the area where the " ) is and see what happens. Alternatively remove bits of you code (some of the bits inside the " " till it starts working. It is difficult to see why the ] is there but not the ) which is why I wonder if the code has been accidentally changed. Colin> > >> Is there )" missing? >> >> Colin > > -- > Posted via http://www.ruby-forum.com/. > > > >
Thank god Resolved .. After getting rid of all these errors.. This is working fine .. Thanks a lot to you guyz .. :)> Are you sure it is in the code? I see it is in the code you posted > earlier, are you sure it is still there? If so then play about with > the source code a bit in that area to work out what is happening. > Don''t worry about whether it is valid html for the moment just try to > work out why the html does not line up with the source. Maybe put > some extra characters in the area where the " ) is and see what > happens. Alternatively remove bits of you code (some of the bits > inside the " " till it starts working. It is difficult to see why the > ] is there but not the ) which is why I wonder if the code has been > accidentally changed. > > Colin-- Posted via http://www.ruby-forum.com/.