Search code examples
javascriptjqueryhtmldisplaytag

How to avoid from going to mail box when the data contains '@' sign in href link of display tag


How to stop the browser from going to mail box when the link contains '@' sign.

<display:column class="aligncenter" style="font-style: italic;"
                        property="conditions" sortable="true" title="Terms & Conditions"
                        autolink="true" href="javascript: openWindow('#')" paramId="pid"
                        paramProperty="pid">
                    </display:column>

function openWindow(pid) {
    pid = pid.substring(0, pid.length - 1);
    var url = "conditionpopup" + pid;
    var a = navigator.appName;
    if (a == "Netscape" || a == "Crome") {
        var w = screen.width / 2.3;
        var h = screen.height / 1.3;
        var left = (screen.width / 2) - (w / 2);
        var top = (screen.height / 2) - (h / 2);
        window.open(url, 'condtionpopup', "width=" + w + ", height=" + h
                + ", top=" + top + ", left=" + left
                + ", resizable=no, titlebar=0,dialog=yes,location=no");
    } else {
        var w = screen.width / 2.3;
        var h = screen.height / 1.5;
        var left = (screen.width / 2) - (w / 2);
        var top = (screen.height / 2) - (h / 2);
        window.open(url, 'condtionpopup', "width=" + w + ", height=" + h
                + ", top=" + top + ", left=" + left
                + ", resizable=no, titlebar=0,dialog=yes,location=no");
    }

}

When the data contains '@' sign it go to the mail box which i dont want I want it to got to the page i am sending


Solution

  • Remove the autolink="true" in display colum tag.......