Jquery Popup not always working in IE

catymoppaex

New Member
I wrote a little jquery script to show a popup. This popup contains a title , text and image. The data is provided by PHP.this is the code for the popup:\[code\]<div id="praline_box"> <div id="pralineBox"> <h1 class="praline_title"></h1> <p class="praline_image"><img src="" alt="" class="prImage"/></p> <p class="praline_text"></p> </div> </div>\[/code\]Code that activates the popup\[code\]<a href="http://stackoverflow.com/questions/10547296/#" onClick="return showDialog('praline_box', '{$field->get('value')|escape}', '{$field->get('info')|escape:'htmlall'}', '{$field->getPictureUrl('detail',250,250,true,false,true)}')"> {if $field->hasPicture()} <img src="http://stackoverflow.com/questions/10547296/{$field->getPictureUrl('thumbnail')}" width="39" height="39" alt="{$field->get("value")|escape}" /> {/if}</a>\[/code\]And this is my javascript / jQuery code:\[code\]function showDialog(dialogId, title, infoText, imgLink ) { $('#modal-window, #modal-overlay').remove(); $("#"+dialogId+" h1.praline_title").html(''); $("#"+dialogId+" p.praline_text").html(''); $('body').append('<div id="modal-overlay"></div><div id="modal-window"></div>'); $("#"+dialogId+" h1.praline_title").append(title); $("#"+dialogId+" p.praline_text").append(infoText); $("#"+dialogId+" p.praline_image .prImage").attr("src", imgLink); $('#modal-window').html('<a id="close"></a>'+$("#"+dialogId).html()); $('#modal-overlay, a#close').click(function(){ $('#modal-window, #modal-overlay').remove(); }); return false; }\[/code\]Now is this code working fine in Firefox / Chrome / Safari. But in IE it sometimes crashes and my redirects to the home page. Does somebody know a solution for this problem, or knows what I am doing wrong?Thanks in advance!
 
Back
Top