J
John Walker
Hi,
In my datagrid I have a textbox with a hyperlink next to it. When the user
clicks on the hyperlink it will pop open another window with a calendar
control, and when the user clicks a date, it will put that date in the
aforementioned textbox and close the calendar window. Here's the javascript
which is added to the hyperlink during ItemDataBound:
'-----> BEGIN (txtScheduledDelivery is the textbox control which gets
populated with the date)
hlScheduledDeliveryCal = CType(e.Item.FindControl("hlScheduledDeliveryCal"),
HyperLink)
hlScheduledDeliveryCal.NavigateUrl =
"javascript:calendar_window=window.open('../controls/calendar.aspx?formname="
& RTrim(txtScheduledDelivery.UniqueID) &
"','calendar_window','width=154,height=184,top=220,left=500');calendar_window.focus()"
'-----> END
The issue is, our customer wants the popup calendar window to always pop up
right next to the hyperlink, so that the lazy users won't have to move the
mouse too far. Has anyone else needed to control the nearly exact position
of a popup window? Can it be easily done?
Thanks,
John
In my datagrid I have a textbox with a hyperlink next to it. When the user
clicks on the hyperlink it will pop open another window with a calendar
control, and when the user clicks a date, it will put that date in the
aforementioned textbox and close the calendar window. Here's the javascript
which is added to the hyperlink during ItemDataBound:
'-----> BEGIN (txtScheduledDelivery is the textbox control which gets
populated with the date)
hlScheduledDeliveryCal = CType(e.Item.FindControl("hlScheduledDeliveryCal"),
HyperLink)
hlScheduledDeliveryCal.NavigateUrl =
"javascript:calendar_window=window.open('../controls/calendar.aspx?formname="
& RTrim(txtScheduledDelivery.UniqueID) &
"','calendar_window','width=154,height=184,top=220,left=500');calendar_window.focus()"
'-----> END
The issue is, our customer wants the popup calendar window to always pop up
right next to the hyperlink, so that the lazy users won't have to move the
mouse too far. Has anyone else needed to control the nearly exact position
of a popup window? Can it be easily done?
Thanks,
John