0

I tried to popup partial view, but its not working ,this is my link

<a id="id1" href="@Url.Action("index", "versus", new { matchid = c.MatchID })" target="_blank" data-toggle="tooltip" data-placement="top" 
                               title="@homeMLName - @awayMLName">
                                @homeMLName - @awayMLName
                            </a>

And this is my script:

<script>
 $('a#id1').click(function (event) {
    event.preventDefault();
    window.open($(this).attr('href'), '_blank');
});
</script>

It opens a new tab instead of a new window

Edited by Stat_1

2
Contributors
2
Replies
15
Views
11 Months
Discussion Span
Last Post by Stat_1
0

It opens a new tab instead of a new window

That's a setting that is in the user preferences for Safari, and probably for other browsers as well.

0

This was my solution:

<a style="cursor:pointer;" data-toggle="tooltip" data-placement="top" title="@homeMLName - @awayMLName"
                                   onclick="window.open('@Url.Action("index", "versus", new { matchid = c.MatchID})','_blank' 'targetWindow', 'menubar=no,scrollbars=yes,resizable=yes, width=600, height=650'); return false;">
                                    @homeMLName - @awayMLName
                                </a>
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.