0

enter image description hereI have write a javascript method on SelectList Option

<apex:selectList id="IdSelectedMembers" value="{!selectedMemberIds}" multiselect="true" size="8" style="width: 200px;" ondblclick="OpenEvent(this.id);">
<apex:selectOptions value="{!selectedMemberOption}"/>                                                    </apex:selectList>
//-----JavaScript Method ----
function OpenEvent(sVal){    
    var sValue = document.getElementById(sVal).value;   
    alert(sValue);    
    var newwindow = window.showModalDialog("/apex/EventCalendar?id="+sValue, 'open page','_blank','scrollbars=yes,toolbar=no,status=no');
    newwindow.focus();
}

I got alert msg but new window not opening. can you help me.

5
  • 2
    this is a deprecated method. Why don't you just use window.open() Commented Oct 12, 2016 at 9:22
  • Which one window.showModalDialog or window.open() Commented Oct 12, 2016 at 10:00
  • @TusharSharma: please put your answer into answer, and not into comments
    – Patlatus
    Commented Oct 12, 2016 at 10:32
  • @Patlatus not sure if OP goes with my suggestion or change his approach. Anyway my answer is added. Thanks. Commented Oct 12, 2016 at 11:14
  • 1
    Hi @TusharSharma I have used window.open(). Commented Oct 12, 2016 at 11:26

1 Answer 1

0

This is a deprecated method. You should use window.open() with same set of parameters

window.open("/apex/EventCalendar?id="+sValue, 'open page','_blank','scrollbars=yes,toolbar=no,status=no');

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .