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

<%= 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

Colin L. wrote in post #1017798:

On 18 August 2011 07:36, Sathiyaraj G. [email protected]
wrote:

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’.

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

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

I tried with using w3c validator. It’s seems ok… just 3 warning errors

On 22 August 2011 10:32, Sathiyaraj G. [email protected]
wrote:

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

Colin L. wrote in post #1017814:

On 22 August 2011 10:32, Sathiyaraj G. [email protected]
wrote:

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

On 18 August 2011 07:36, Sathiyaraj G. [email protected]
wrote:

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’.

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

Sathiyaraj G. 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 G. 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.

On Aug 23, 4:13am, Sathiyaraj G. [email protected] wrote:

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.


Posted viahttp://www.ruby-forum.com/.

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
element?

bluetwin wrote in post #1018192:

On Aug 23, 4:13am, Sathiyaraj G. [email protected] wrote:

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.


Posted viahttp://www.ruby-forum.com/.

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
element?

Hi bluetwin,

I found a problem… I try using div tag instead of tr tag. It’s working
fine. But so many redesign work.

So i want to working in that tag. Any guess?..