Tenho esse href
<a class="white" onclick="NewPopupWindow(this, 'Disclaimer', '400', '450', 'no'); return false;" href="disclaimer.jsp">
<strong>Disclaimer</strong>
</a>
com esse javascript
function NewPopupWindow(mypage, myname, w, h, scroll) {
LeftPosition = (screen.width) ? (screen.width-w) / 2 : 0;
TopPosition = (screen.height) ? (screen.height-h) / 2 : 0;
settings = 'height=' + h + ',width=' + w + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',resizable=false';
alert(mypage);
mypage = mypage.replace("javascript:submitLink('");
mypage = mypage.replace("')");
win = window.showModalDialog(mypage, window, settings);
}
Mas retorna a string “javascript:submitLink(‘disclaimer.jsp’)” e deveria retornar apenas 'disclaimer.jsp’
É uma gambiarra fazer esse replace. mesmo usando ele a página não abre o pop up.
o estranho é q se eu não logar no sistema e usar esse link ele funciona.
Vocês sabem como tirar “javascript:submitLink(’’)” do link?