IE replaceWith issue
IE replaceWith issue
Hi,
During the last month i understand jQuery a lot better and i have my codes working great in every browser but IE. When i tell it to replace an ID with different content then post a request and tell it to replace the ID i just replaced with the received content IE spits out a NULL error for my JSON request.
This is the code I'm using...
- function switch_coms_page(sid,page){
- nuke_jq('.comments_split_bar').remove();
- nuke_jq('#comments_pages').remove();
- nuke_jq('#comments_head').remove();
- nuke_jq('.comments_list').replaceWith('<tr id=\"loading_image\"><td align=\"center\" class=\"row1\" colspan=\"2\"><img src=\"modules/$module_name/images/loading.gif\" alt=\"\" /></td></tr>');
- nuke_jq.post('modules.php?name=$module_name', {staff_ajax: 1, sid: sid, page: page, act: 'switch_coms_page'}, function(data){
- if (data['return'] == 'good'){
- nuke_jq('#loading_image').replaceWith(data['comments']);
- } else {
- nuke_jq('#loading_image').replaceWith('<tr id=\"loading_image\"><td align=\"center\" colspan=\"2\">$lang_staff[coms_load_error]</td></tr>');
- }
- }, 'json');
- }
Ive gone over every post and topic i can find with the keyword replaceWith yet nothing comes up as to what causes this error for me. Any help as to why its occurring i would appreciate.
Cheers,
Chris