Hi,
Am designing a chat application. It uses IFRAME to display the conversation between users. It is a web user control. I wish to scroll programmatically the content of IFRAME at last on every send button click event. I designed the entire control as a web user control. Any solution to move the content. If you have any better solution it will be appreciated.
I tried the following,
But the above coding is working but, It displays x is null. so the next statement is not worked. So the scrolling is not happening.Code:Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "MyScript", "var x = document.getElementById('" + Me.chatFrame.ID() + "'); alert(x); x.scrolltop=x.scrollHeight", True)
I tried Me.chatFrame.CleintID instead of me.chatFrame.ID(). but it is not working.
regards,
Senthil




Reply With Quote