Updating div on Ajax call in IE6

In my application when i make an ajax call i am trying to update a div
and it works fine in mozilla but not in IE. In IE all ajax calls are
made but the div doesn’t get updated at all
Any clue as to why this might be happening?

My code looks something like
<%=form_remote_tag :method=>‘post’, :url=>{:action =>‘choose_action’,
}%>

<%= link_to_remote 'Add Additional Values', :url => {:action => 'update_auto_complete_div', }%>

def update_auto_complete_div
render :update do |page|
page.replace_html “contract_data_element_data_#{params[:count]}”,
:inline => “”
page.replace_html “contract_data_element_data_#{params[:count]}”,
:partial=>‘data_string_autocomplete’
end
end

On 29 May 2008, at 22:04, Neha C. wrote:

In my application when i make an ajax call i am trying to update a div
and it works fine in mozilla but not in IE. In IE all ajax calls are
made but the div doesn’t get updated at all
Any clue as to why this might be happening?

You’re not passing a count parameter to update_auto_complete_div, so
its going to end up trying to replace the contents of
contract_data_element_data_ which I assume doesn’t exist (why 2
replace_htmls?)

Fred

Frederick C. wrote:

On 29 May 2008, at 22:04, Neha C. wrote:

In my application when i make an ajax call i am trying to update a div
and it works fine in mozilla but not in IE. In IE all ajax calls are
made but the div doesn’t get updated at all
Any clue as to why this might be happening?

You’re not passing a count parameter to update_auto_complete_div, so
its going to end up trying to replace the contents of
contract_data_element_data_ which I assume doesn’t exist (why 2
replace_htmls?)

Fred

Actually i am passing that parameter and a number of other parameters.
Even if my code is like
<%=form_remote_tag :method=>‘post’, :url=>{:action =>‘choose_action’,
}%>

<%= link_to_remote 'Add Additional Values', :url => {:action => 'update_auto_complete_div', }%>

def update_auto_complete_div
render :update do |page|
page.replace_html “contract_data_element_data_#{params[:count]}”,
:inline => “”
page.replace_html “contract_data_element_data_#{params[:count]}”,
:partial=>‘data_string_autocomplete’
end
end

It still doesnt work in IE

On 29 May 2008, at 23:21, Neha C. wrote:

}%>

<%= link_to_remote 'Add Additional Values', :url => {:action => 'update_auto_complete_div', }%>

You’d have to set the div id to contract_data_element_data_
If that code is what’s in your view (and if not then asking people to
help diagnose a problem with 1 piece of code while showing another)
then you’re really not passing any parameters to
update_auto_complete_div. IE6 is weird though.

Fred

Frederick C. wrote:

On 29 May 2008, at 23:21, Neha C. wrote:

}%>

<%= link_to_remote 'Add Additional Values', :url => {:action => 'update_auto_complete_div', }%>

You’d have to set the div id to contract_data_element_data_
If that code is what’s in your view (and if not then asking people to
help diagnose a problem with 1 piece of code while showing another)
then you’re really not passing any parameters to
update_auto_complete_div. IE6 is weird though.

Fred

In my code i open a popup window and when i create that window for the
first time it works fine in IE also…but then when i open another
window that has code to edit those values it stops working.