Hi,
I apologize if I’ve put this in the wrong category.
I’m having an IE specific issue and I have no clue how to resolve it.
I am using prototype, scriptaculous, and dialog (an extension written by Jeff Smick at [url]http://snippets.dzone.com/posts/show/3411
When using IE, I’m getting a “Object doesn’t support this property or method” when implementing the dialog.
The error is being thrown on the line: [B]$(domid).show();
Here’s my code sample:
[CODE]<script type=”text/javascript”>
function displayAnnouncementDetail(anid,domid)
{
new Dialog.Box(domid);
[B]$(domid).show();[/B]
var opt = {
onSuccess: function(t) {
//evaluate response so that announcementHeader and announcementBody are set
eval(t.responseText);
if(announcementHeader != ” && announcementBody != ”)
{
document.getElementById(‘announcementHeader’).innerHTML = announcementHeader;
document.getElementById(‘announcementBody’).innerHTML = announcementBody;
}
else
{
$(domid).hide();
}
},
on404: function(t) {
alert(‘Error 404: location “‘ + t.statusText + ‘” was not found.’);
},
onFailure: function(t) {
alert(‘Error ‘ + t.status + ‘ — ‘ + t.statusText);
}
}
new Ajax.Request(‘/index.php/myhome/getAnnouncement/’ + anid, opt);
}
</script>
[b]anid
[b]domid
[CODE]
<div id=”announcementContainer” style=”display:none;”>
<div id=”announcementHeader”>Announcement</div>
<div id=”announcementBody”>Loading…</div>
<div id=”announcementFooter”><a href=”javascript:void(0);” onClick=”$(‘announcementContainer’).hide();”>Close Announcement</a></div>
</div>
So, when I call my function, I use something like:
[CODE]<a href=”javascript:void(0);” onClick=”displayAnnouncementDetail(‘6′,’announcementContainer’);”>site admin announcement</a>
Like I stated above, in Firefox it works perfect. In IE, I get the error.
I have attached the dialog.js extension that I’m using.
Thanks!
[upl-file uuid=859b1959-bfad-42cc-b3cf-9021807264f6 size=2kB]dialog.txt