RJS error rails 1.2.3 + firefox 4 and above

Hi,

In my application I used in admin module to expand and collpase
functionality using ajax(link_to_remote) method. It's working fine in
mozilla 3 and below version..

But when I using in mozilla 4 expand functinality was working fine but
collapse are not work, it's just 'wrinkls'.

My code is like below
<tr id="<%= content_element_id %>">
<%= link_to_collapse(:school, content_element_id,
icon_for_backend_collapse) %>
<%= link_to_expand(:school, content_element_id, icon_for_backend_expand)
%>

def link_to_expand(model_name, content_element_id, link_text)
    link_to_remote(link_text,
                            :url => {
                                      :controller =>
"manage/schools",
                                      :action => :show,
                                      :id =>
params[:id],
                                      :update =>
content_element_id,
                                      :partial =>
"/manage/schools/expanded_table_row"
                                    },
                            :alt => 'expand')
  end

def link_to_collapse(model_name, content_element_id, link_text)
    link_to_remote(link_text,
                            :url => {
                                      :controller =>
"manage/schools",
                                      :action => :show,
                                      :id =>
params[:id],
                                      :update =>
content_element_id,
                                      :partial =>
"/manage/schools/collapsed_table_row"
                                    },
                            :alt => 'collapse')
  end

any help regarding this would be appreciated..

Please anybody help me in this.. still i am struggling with this

Have you tried running Firebug in Firefox to check for script errors?
Also copy the complete page html (View > Page Source or similar in
browser) and paste it into the w3c html validator.

Differences between operation in different browsers are often the
result of malformed html or scripts.

Colin

Colin Law wrote in post #1017798:

There you are then, that is the problem

Colin

Colin Law wrote in post #1017814:

collapse are not work, it's just 'wrinkls'.

I tried firefox with firebug. But it seems 200 Ok. When i click
collapse button, I received RJS error, Object element is NULL..

There you are then, that is the problem

Colin

Hi colin,

Please may I know how we can fix this. Please see my code above and let
me know what error on this..
Note: I am using rails 1.2.3 and ruby 1.8.6

When click expand, it's working fine and when click collapse it's
response is 200 ok in firfox when using firbug,

but, i get alert message Typeerror Object(some update id name) is null

Thanks and Regards,
Sathiya.rails

Sathiyaraj Gurusamy wrote in post #1017959:

Please may I know how we can fix this. Please see my code above and let
me know what error on this..
Note: I am using rails 1.2.3 and ruby 1.8.6

When click expand, it's working fine and when click collapse it's
response is 200 ok in firfox when using firbug,

Why would clicking collapse require sending a request to the server?

7stud -- wrote in post #1017986:

Sathiyaraj Gurusamy wrote in post #1017959:

Please may I know how we can fix this. Please see my code above and let
me know what error on this..
Note: I am using rails 1.2.3 and ruby 1.8.6

When click expand, it's working fine and when click collapse it's
response is 200 ok in firfox when using firbug,

Why would clicking collapse require sending a request to the server?

Basically we listed schools. If I click particular school then it will
expand(edit the all fields and descriptions and save)
after that i want close this expand by clicking collapse button then it
will close(replacing existing content with new content) and reload that
particular div with updated value.

Sounds like a Javascript selector problem.
Can you post the .rjs file for each partial? "/manage/schools/
expanded_table_row" and "/manage/schools/collapsed_table_row"

is the expanded rjs changing the <tr id="<%= content_element_id %>">
element?

bluetwin wrote in post #1018192: