Pergunta

This is my code of jsp page

<div class="hide">
    <!-- actions for datatables -->
    <div class="dt_gal_actions">
    <div class="btn-group">
        <portlet:renderURL var="showjspURL">
            <portlet:param name="jspPage" value="/jsps/newrestaurant.jsp" />
        </portlet:renderURL>

        <a href="<%= showjspURL.toString() %>" target="_self" class="btn btn-success" title="Click to Add new advertise">New Restaurant</a>

        <button data-toggle="dropdown" class="btn dropdown-toggle">
            Action <span class="caret"></span>
        </button>

        <ul class="dropdown-menu">
            <li><a href="#" class="delete_rows_dt" data-tableid="dt_gal"><i class="icon-trash"></i> Delete</a></li>
            <li><a href="javascript:void(0)">Lorem ipsum</a></li>
            <li><a href="javascript:void(0)">Lorem ipsum</a></li>
        </ul>
    </div>
</div>

Here is my problem:

<a href="<%= showjspURL.toString() %>" target="_self" class="btn btn-success" title="Click to Add new advertise">New Restaurant</a>

this link always open in new window.i had tried evry tag but its not changing the way its open..

How can I solve this? The above is my jsp page where am using this.

Foi útil?

Solução

I dont know what was the problem in that simple href..but i had solved that with the following href using java script if in case it helps to other...

 <a href="javascript:q=(document.location.href);void(open('<%=showjspURLs.toString() %>?url='+escape(q),'_self','resizable,location,menubar,toolbar,scrollbars,status'));" class="btn btn-success" title="Click to Add new advertise">New AD</a>

Hope this help someone

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top