+ Start a Discussion
kevindotcarkevindotcar 

Popup window doesn't popup

 

Hi team,
I defined a custom link on a lead page, with the idea of popping up  a timer page.
I defined the link as onclick javascript:
< script type="text/javascript">

    window.open ("https://na4.salesforce.com/apex/ApexClock","mywindow","menubar=0,resizable=1,width=350,height=250");

< /script>

...And the ApexClock is just a simple system-clock display:
< apex:page id="thePage" showHeader="false">

< html>

< body>

< center>

< div id="clock"></div> < /center> < br/>

< div align="right"> < button onclick="int=window.clearInterval(int);" id="stop">Stop Clock</button>

< /div>

< /body>

< script type="text/javascript">

var int = self.setInterval("clock()",1000); function clock()  {    

var d=new Date();    

var t=d.toLocaleTimeString();    

document.getElementById("clock").innerHTML = "<B>" + t + "</B>"; }

< /script>

< /html>

< /apex:page>

... I know I shouldn't  hard-code the server name - I'll fix that, but the  popup doesnt show, and I know popup blockers are disabled.
Anyone know what I'm doing wrong?  Any help is appreciated.

KC

kevincar64kevincar64

Sory to bug everyone-

I took the <script>  </script>" tags off of the onclick javascript code and it worked fine.

 

Learn something new every day