Fiaz,
I applied your code but the offsets weren't what I had expected. The
hyperlink on every row in the datagrid showed the the same values. The
values were:
offsetTop - 1
offsetLeft - 77
offsetWidth - 31
The calendar would appear in the upper left hand area of the screen, even
though I was clicking on a hyperlink in the lower right hand side of the
browser. I applied your code exactly as you posted it. Might you have any
idea what I'm doing wrong?
Thanks again,
John
"Fiaz Ali Saleemi" wrote:
> Hi John
>
> Try this code sample and let us know. I hope it will work
>
> hlScheduledDeliveryCal = CType(e.Item.FindControl("hlScheduledDeliveryCal") ,
> HyperLink)
>
> hlScheduledDeliveryCal.Attributes.Add("onclick", "Go(this.offsetTop,
> this.offsetLeft + this.offsetWidth, '" &
> RTrim(txtScheduledDelivery.UniqueID) & "');")
>
> Add a javascript function to the client side.
>
> function Go(top, left, UniqueID)
> {
> var calendar_window = window.open('../controls/calendar.aspx?formname=' +
> UniqueID,
> 'calendar_window', 'width=154,height=184,top=' + top + ',left=' + left);
> calendar_window.focus();
> }
>
> Regards
> Fiaz Ali Saleemi
>
>
>
>
|