A popup and focus problem

T

theintrepidfox

Dear Group

Some would think this works but somehow the Focus Button Click Event
comes back with a message saying that WindowObjectReference is either
NULL or not an object! Both buttons are contained on the same page. Any
ideas what's wrong?

Tanks for your help and efforts!
Have a nice day!

M

---------------------------------------------------------------
PopUp Button Click Event

Private Sub cmdPopUp()

Dim scriptstring AS String = "<script language=JavaScript> var
WindowObjectReference =
window.open('popup.aspx','Popup','width=320,height=150,resizable=no,scrollbars=no');</script>"

RegisterStartupScript("popup", scriptstring)

End Sub

----------------------------------------------------------------
Focus Button Click Event:

Private Sub cmdFocus()

Dim scriptstring As String = "<script language=JavaScript>
WindowObjectReference.focus();</script>"

RegisterStartupScript("focus", scriptstring)

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top