How can I modify following code so the link will open in a new window which width and height will be specified by me in code ?
I want this link http://viktorix.hyperboards3.com/ind...action=pm_view to be open in a new window.Code:<script type="text/javascript"> <!-- // New/No new PM button in menu // Image to show there are new private messages var newPM = "http://home.ripway.com/2005-5/316598/addfriend.gif"; // Image to show there are no new private messages var noPM = "http://home.ripway.com/2005-5/316598/house.gif"; var pmLink = document.createElement("a"); var pmImg = document.createElement("img"); var pmCell = document.getElementsByTagName("td").item(2).innerHTML; pmLink.href = "http://viktorix.hyperboards3.com/index.cgi?action=pm_view"; pmImg.border = "0"; if(pmCell.match(/you have <.+?>, (\d+) /i)){ switch(RegExp.$1){ case "0" : pmImg.src = noPM; pmImg.title = "You have no new private messages."; break; case "1" : pmImg.src = newPM; pmImg.title = "You have 1 new private message."; break; default : pmImg.src = newPM; pmImg.title = "You have " + RegExp.$1 + " new private messages."; } pmLink.appendChild(pmImg); document.getElementsByTagName("td").item(5).appendChild(pmLink); } //--> </script>
Thanks!



Reply With Quote

Bookmarks