Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 5th, 2002, 08:26 AM
SABmore SABmore is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 17 SABmore User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 34 sec
Reputation Power: 0
Detecting Pop-Up Stoppers

Is there a way to detect if a user has a pop-up stopper program installed?

Reason being, I currently have a program that detect if JavaScript is enabled, allowing me to reroute the user to the necessary page if it is/isn't.

But if the browser has JavaScript turned on, but the user is using a pop-up stopper I get the following error, which causes my page to hang:

"The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute."

Any help is much appreciated.

Reply With Quote
  #2  
Old December 5th, 2002, 12:14 PM
dgibson dgibson is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2002
Location: Urbana, MD, USA
Posts: 66 dgibson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
I don't understand two things:

1. Why do you need to do this detecting in the first place?

2. how you can do this server-side that opens another window or redirects you to a location (what language are you writing this in?)

I'm curious as to how you've done what you have, and how you might possibly handle all the different methods of stopping popups in the first place.

Reply With Quote
  #3  
Old December 6th, 2002, 08:41 AM
SABmore SABmore is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 17 SABmore User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 34 sec
Reputation Power: 0
1) I need to detect the pop-up stopper's use because if it is active, it breaks my code, and causes my page to just hang. So I need a work around (if pop-up stopper = true, then do this, else do that).

2)My code is a mix of ASP and Javascript, I've pasted most of it below. Let me know if you have any other questions. Thanks!
Code:
<html>
<head>
<title>Search is processing...</title>

<script language="javascript">

function openWindow1() 
{ 
	var ScreenWidth;
	var ScreenHeight;

	ScreenWidth = (window.screen.width/2) - (75 + 10);
	ScreenHeight = (window.screen.height/2) - (100 + 50);
	
	window.open("/results2.asp?UserRestriction=<%=UserRestrictionValue%>","","status=no, width=310,height=340,toolbar=NO,scrollbars=NO,resi  zable=YES,left=" + ScreenWidth + ",top=" + ScreenHeight + ",screenX=" + ScreenWidth + ",screenY=" + ScreenHeight + "") 
}


function openWindow2() 
{ 
	var ScreenWidth;
	var ScreenHeight;

	ScreenWidth = (window.screen.width/2) - (75 + 10);
	ScreenHeight = (window.screen.height/2) - (100 + 50);
	
	window.open("/results2.asp?UserRestriction=<%=UserRestrictionValue%>","","status=no, width=310,height=390,toolbar=NO,scrollbars=NO,resi  zable=YES,left=" + ScreenWidth + ",top=" + ScreenHeight + ",screenX=" + ScreenWidth + ",screenY=" + ScreenHeight + "") 
}

function openWindow3() 
{ 
	var ScreenWidth;
	var ScreenHeight;

	ScreenWidth = (window.screen.width/2) - (75 + 10);
	ScreenHeight = (window.screen.height/2) - (100 + 50);
	
	window.open("/results2.asp?UserRestriction=<%=UserRestrictionValue%>","","status=no, width=310,height=440,toolbar=NO,scrollbars=NO,resi  zable=YES,left=" + ScreenWidth + ",top=" + ScreenHeight + ",screenX=" + ScreenWidth + ",screenY=" + ScreenHeight + "") 

}

function relocateSearch()
{
	window.location = "/query.idq?UserRestriction=<%=UserRestrictionValue%>&CiMaxRecordsPerPage=<%=CiMaxRecordsPerPage%>&CiScope=<%=CiScope%>&TemplateName=<%=TemplateName%>&CiSort=<%=CiSort%>&HTMLQueryForm=<%=HTMLQueryForm%>"
}

</script>

</head>

<body>

<%

'Create a recordset object
Set rsSearchResults = Server.CreateObject("ADODB.Recordset")

'Initalise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT Count(tblWebsites.Title) FROM tblWebsites "
strSQL = strSQL & "INNER JOIN tblkeyword ON tblWebsites.SiteIDNo = tblkeyword.SiteID "
strSQL = strSQL & "WHERE (((tblkeyword.Keywords)='"& strSearchKeywords & "'));"


'Response.Write strSQL

on  error resume next

Set objConn = Server.CreateObject ("ADODB.Connection") 'creates connection to DB
objConn.Mode = 3 'adoModeReadWrite

objConn.open Application("searchEngine")

set rstemp = objConn.Execute(strSQL)

'Call ErrorVBScriptReport("Select Statement")
'Call ErrorADOReport(strSQL, objConn)
Call ReRouteOnError


Select Case lcase(javascriptEnabled)

case "yes"

	if (rstemp.eof or rstemp(0)=0) then

		UserRestrictionValue = replace(UserRestrictionValue, "''", "'")
		Response.Write "<script language=javascript>"
		Response.Write "relocateSearch()"
		Response.Write "</script>"
	
		else

			if rstemp(0) = 1 then

				Response.Write "<script language=javascript>"
				Response.Write "openWindow1(); "
				Response.Write "relocateSearch()"
				Response.Write "</script>"
	
			else

				if rstemp(0) = 2 then

					Response.Write "<script language=javascript>"
					Response.Write "openWindow2(); "
					Response.Write "relocateSearch()"
					Response.Write "</script>"
		
					else

						if rstemp(0) >= 3 then

							Response.Write "<script language=javascript>"
							Response.Write "openWindow3(); "
							Response.Write "relocateSearch()"
							Response.Write "</script>"
	
						end if
				end if
			end if
	end if

case "no"
	response.redirect "/query.idq?UserRestriction="& UserRestrictionValue &"&CiMaxRecordsPerPage="& CiMaxRecordsPerPage &"&CiScope="& CiScope &"&TemplateName="& TemplateName &"&CiSort="& CiSort &"&HTMLQueryForm="& HTMLQueryForm &""

End Select

rstemp.close
set rstemp = nothing
objConn.Close
set objConn = nothing
%>
</body>
</html>

Reply With Quote
  #4  
Old December 12th, 2002, 08:15 PM
James Yang James Yang is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Atlanta, Georgia
Posts: 284 James Yang User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 45 sec
Reputation Power: 7
Send a message via ICQ to James Yang
pop up stopper users are usually aware of this . They know that their prog will break some legitimate site with legitimate popups. So u probably don't have to worry about those little things
__________________
Regards,

James Yang
.NET Developer / Network Engineer
MCSE, MCDBA, MCSA, CCNA

http://www.yellowpin.com/
http://www.opentechsupport.com/

Reply With Quote
  #5  
Old May 18th, 2004, 05:53 PM
rluck rluck is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 1 rluck User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Pop Up Stoppers

I'm not seeing an answer in this thread. I, too, have a need to use pop-ups in an application I'm building (for launching page-contextual Help files) and am worried that Pop-Blockers will break this functionality.

Does anyone know if Pop-Up blockers stop user-initiated pop-ups? (ie: the user clicked on a link that spawns the new window)?

Help is greatly appreciated.

Rich

Reply With Quote
  #6  
Old May 18th, 2004, 06:50 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 8 m 57 sec
Reputation Power: 9
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Usually, popup blockers only block non-user initiated windows - i.e. onload, onunload fire events.
__________________
DevArticles Moderator
BlueSix - Web Development and Consulting

Reply With Quote
  #7  
Old May 18th, 2004, 08:18 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
In opposition to stumpy's latest point, i've seen my spam detector detect stuff that isn't spam... but some Javascript popups do work... I agree with him about the onload/unload events...

Perhaps the best way to attack this problem is to simply be aware of the fact that it happens... A simple disclaimer mentioning that some functions on the site might not work if popups are disabled.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > Detecting Pop-Up Stoppers


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT