Parameter passing problem ..

Not without a heck of a lot more detail...

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 .. :slight_smile:

Hassan Schroeder wrote:

Anybody listening me .. ?

Hemant Bhargava 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 Action View Form Helpers — Ruby on Rails Guides

Fred

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

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

Can you paste your code?

Man this validator is giving me "469 Errors, 346 warning(s)". What crap is this?

Well you wrote it.

Colin

Sorry, couldn’t resist to reply with a big smile on my face :wink: hehe…

First of all, as XML is case sensitive, I would change this:

<!DOCTYPE HTML PUBLIC...

to this:

<!DOCTYPE html PUBLIC...

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)

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 ..:slight_smile:

<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:-

Ok thanks a lot for your replies, Just about to finish it with a big smile on my face ..:slight_smile:

<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

Ok thanks a lot for your replies, Just about to finish it with a big smile on my face ..:slight_smile:

<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

<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:-

<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

Forgot to write here .. Its in mine source code ..:slight_smile: 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.:slight_smile:

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