Roolee
asked on
PopUp Window onload
I want to open a small pop up window when the page first loads.
I tried doing it as javascript on load on the html page, but the page does postback as I have radio buttons on it, and I don't want the pop up to load everytime the page loads - just the first load.
Does anyone have any ideas how I can do this?
Can I call a client side function from code behind pages?
I tried doing it as javascript on load on the html page, but the page does postback as I have radio buttons on it, and I don't want the pop up to load everytime the page loads - just the first load.
Does anyone have any ideas how I can do this?
Can I call a client side function from code behind pages?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Dim ParentLoadScript As String
Dim strURL As String
If not page.IsPostBack Then
strURL = "POREP01.aspx"
ParentLoadScript = "<script language=javascript>"
ParentLoadScript &= "window.open('" + strURL + "');"
ParentLoadScript &= "</" & "script>"
End If
If Not IsClientScriptBlockRegiste red("Paren tLoad") Then
RegisterClientScriptBlock( "ParentLoa d", ParentLoadScript)
End If
The above should work..Just replace the "POREP01.aspx" with the name of your pop up page..
Regards,
Priya
Dim strURL As String
If not page.IsPostBack Then
strURL = "POREP01.aspx"
ParentLoadScript = "<script language=javascript>"
ParentLoadScript &= "window.open('" + strURL + "');"
ParentLoadScript &= "</" & "script>"
End If
If Not IsClientScriptBlockRegiste
RegisterClientScriptBlock(
End If
The above should work..Just replace the "POREP01.aspx" with the name of your pop up page..
Regards,
Priya
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: _TAD_ {http:#9608158}
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
TheLearnedOne
EE Cleanup Volunteer
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: _TAD_ {http:#9608158}
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
TheLearnedOne
EE Cleanup Volunteer
The key in the code is that in the On_PageLoad function you need
if IsPostback = false then
or
If !IsPostback then
command