Re: PopUp Window from Codebehind
From: Curt_C [MVP] (software_AT_darkfalz.com)
Date: 09/09/04
- Next message: Curt_C [MVP]: "Re: Moving ASP.Net programs to production"
- Previous message: JD: "Re: Open Browse"
- In reply to: Greg Burns: "Re: PopUp Window from Codebehind"
- Next in thread: Greg Burns: "Re: PopUp Window from Codebehind"
- Reply: Greg Burns: "Re: PopUp Window from Codebehind"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 9 Sep 2004 14:35:31 -0500
It's not a popup if the user clicked it, it's a link. Popups are usually
designated as loaded from within the page without the user instructing it to
do so.
-- Curt Christianson Owner/Lead Developer, DF-Software Site: http://www.Darkfalz.com Blog: http://blog.Darkfalz.com "Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message news:O7hQv9plEHA.2612@TK2MSFTNGP15.phx.gbl... > Kevin, > > This has been bother me for quite awhile. > > Why does my code for a pop-up window from my app not get blocked by IE SP2 > pop-up blocker or the Google toolbar? (Yet some other pop-up blockers > that my users have installed does block it) > > (No exceptions have been made in IE's Pop-up blocker settings either) > > Private Function openNewWindow(ByVal url As String, ByVal windowName As > String, ByVal features As String) As String > > ' url parameter must be enclosed in single quotes!!! > > Dim sb As System.Text.StringBuilder = New System.Text.StringBuilder > sb.Append("javascript:var " & windowName & " = window.open(" + url > + ",'" + windowName + "','" & features + "');" & windowName & ".focus();") > > Return sb.ToString() > End Function > > The code is not really important here. I think I might be missing the big > picture; are pop-up allowed if they are user initiated. (i.e. a user click > a hyperlink that causes the pop-up)? > > BTW, here is a great link I saw yesterday to encapsulate creating a pop-up > into a class: > > http://www.dotnet2themax.com/ShowContent.aspx?ID=5f606582-4626-4c6f-a6e9-6f952f31491a > > Greg > > "Kevin Spencer" <kspencer@takempis.com> wrote in message > news:Oe65wZplEHA.324@TK2MSFTNGP11.phx.gbl... >> Forgive me. I spoke too quickly Upon reflection, I realized that >> JavaScript >> can't click a hyperlink. Oh well. I can't think of any other way to open >> a >> new browser window that won't be foiled by popup blockers. Best to try >> another route. >> >> -- >> HTH, >> Kevin Spencer >> .Net Developer >> Microsoft MVP >> I get paid good money to >> solve puzzles for a living >> >> "bruce barker" <nospam_brubar@safeco.com> wrote in message >> news:ed96JxolEHA.3544@TK2MSFTNGP15.phx.gbl... >>> while you can emit javascript to do this, any popup blocker will stop >>> it. >>> >>> -- bruce (sqlwork.com) >>> >>> >>> "Rathtap" <amcniw@yahoo.com> wrote in message >>> news:b21a5958.0409090743.56e95c28@posting.google.com... >>> > I want to popup a window from my codebehind. The reason is that during >>> > the postback the code needs to do some validations and to build the >>> > arguments that are passed in the url. How can I achieve this >>> > functionality? >>> > The reason I do not want to use Response.Redirect is because when the >>> > user comes back to the first page, all the selections that were >>> > made(which are the arguments) disappear. >>> >>> >> >> > >
- Next message: Curt_C [MVP]: "Re: Moving ASP.Net programs to production"
- Previous message: JD: "Re: Open Browse"
- In reply to: Greg Burns: "Re: PopUp Window from Codebehind"
- Next in thread: Greg Burns: "Re: PopUp Window from Codebehind"
- Reply: Greg Burns: "Re: PopUp Window from Codebehind"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|