Hi

I'm trying to write a little script for a popup calendar. What I'd like to do is set it up so when the button is pushed, the calendar pops right next to the button.

The trouble I'm having is passing a value within the function. This is within a usercontrol.

I've tested this and it works
Code:
Button1.Attributes.Add("onclick", "var ele = document.getElementById('" & TextBox1.ClientID & "');var offsetLeft = ele.offsetLeft;var offsetTop = ele.offsetTop;alert('Left: '+ offsetLeft + ' Top: ' + offsetTop);")
The trouble begins when I swap the alert with
Code:
window.open('Test.aspx','Test_Page', 'width=200,height=200,left=offsetLeft,top=offsetTop');
In source view, i've got strings (offsetLeft) instead of the integer value.

Can someone help me with the correct syntax

Thank You