I have taken over a web application from a previous developer which is built on asp.net and vb.net
I am trying to create a simple popup with javascript but the popup is not working.
the asp.net code was
<a class="hover-glow" data-placement="bottom" rel="tooltip"
title="change status"
data-bind="attr: { 'href':'update-status_popup.aspx?i='
+ Id + '&c=' + StatusId }">
<i class="icon icon-random"></i>
</a>
The link is opening on a different page. when opening link it's also getting the ID from the database.
The requirement is now to open the link in a popup window.
I have created a javascript function call popup(). The code is like below:
<script type="text/javascript" charset="utf-8">
function popup() {
var url = 'update-status_popup.aspx?i=' + Id + '&c=' + StatusId;
window.open(url);
}
</script>
and edited the html code as below:
<a class="hover-glow" data-placement="bottom" rel="tooltip"
title="change status"
databind = "attr: { 'href = javascript: popup()' }">
<i class="icon icon-random"></i>
</a>
When i click on the link nothing happens.
I have also tried:
<a class="hover-glow" data-placement="bottom" rel="tooltip"
title="change status" onclick ="javascript: popup()">
<i class="icon icon-random"></i>
</a>
and:
<a class="hover-glow" data-placement="bottom" rel="tooltip"
title="change status" href ="javascript: popup()">
<i class="icon icon-random"></i>
</a>
The result is the same.
The popup must not disable the parent screen.
The website is using another popup by colorbox which disables the screen.
Appreciate your kind response.