Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm trying to make this link below work with IE7 but it doesn't fire. Whereas is ok in IE9 and firefox. Any ideas what i'm doing wrong :( THanks

   <a href="#" onclick="openDialog('/Comms.aspx?sc={@ID}'); return true "><xsl:value-of select="@Title"/></a>

<script type="text/javascript">
function openDialog(FormPath) {
    var options = {
        url: FormPath,
        width: 950,
        height: 800,
        title: "Communications",
        allowMaximize:'true',
    };
    SP.UI.ModalDialog.showModalDialog(options);
}
</script>
share|improve this question

1 Answer 1

up vote 3 down vote accepted

Remove comma right after allowMaximize:'true', :)
When writing javascript always track script errors that might appear. In IE they displays in left bottom corner, you can click it to see details and also can check "Always show this message for webpage errors" and this popup will show every time when javascript errors appear.

share|improve this answer
    
THanks for the Kai.Missed that :( What IE showed the error.IE7 or IE 8. Just curious as i notice the Doen error on the let but doesn't show me the exact problem Cheers –  naijacoder Jan 4 '12 at 6:52
    
Cheers, solved the exact same error for me. Error only occured in IE7, worked fine in 8 & 9. –  GavinB May 30 '12 at 22:30
    
Thanks, removing comma from last column worked for me. –  user14669 Feb 5 '13 at 12:31
    
Yip.. i've seen this before. Good answer! –  Fox Feb 5 '13 at 16:04
    
As an aside, I would suggest against developing for IE7. There are several CSS inconsistances that are absolutely annoying, such as ASP buttons set to be the page's "default button" rendering with an extra border as well as not being able to use display: inline-block; in your CSS. I noticed this when we were developing locally and our IE policy was set to run all Intranet sites in Compatibility mode which is AWFUL! –  EHorodyski Mar 14 '13 at 18:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.