PDA

View Full Version : pop up relitive to cursor


hoodymahood
10-31-2002, 11:07 AM
is it possible to convert the script below to make the script below popup relitive to the mouse curser like the many right click scripts i have read through them but do not understand them so have turned to you.

hope you can help me.


<script>

function openpopup(){
var popurl="m_pop.htm"
winpops=window.open(popurl,"","width=150,height=300,")
}

</script>

<a href="javascript:openpopup()" style="text-decoration: none;">^</a>

beetle
10-31-2002, 02:33 PM
This perhaps?

<script>

function openpopup(popurl){
var w = 150;
var h = 300;
var l = event.x - parseInt(w/2);
var t = event.y - parseInt(h/2);
var features = "width= "+w+", height="+h+", top="+t+", left="+l;
winpops=window.open(popurl,"",features)
}

</script>

<a href="m_pop.htm" onClick="openpopup(this.href); return; false;" style="text-decoration: none;">^</a>