CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Problem with onblur in new window

Print topic Send  topic

Author Message
mammer
Posted: 06/16/2002, 10:30 AM

First, let me say that I am not generally a fan of opening independent windows to provide functionality. However, my client insists that this functionality is needed. So, I need some help diagnosing a problem with a simple javascript called from a window's onblur event. I have form on a page that calls another page "SearchSalesReps.asp" which is opened as a new window using the "search_salesreps" function below. The problem occurs when I put the OnBlur="window.close()" script into <BODY> tag of the SearchSalesReps.asp page. This script is intended to close the SearchSalesReps.asp page when the user clicks outside the page (on the parent page) which works fine. However, it has the undesireable side effect of closing the page even when the user clicks on the text field within a form, or on any part of a form, on the SearchSalesReps.asp page. I am using ASP & Templates running on WinXP Pro/IIS/Access 2002/IE 6.0.26. Any suggestions would be appreciated.

Thanks much
Mammer

This is the function that opens SearchSalesReps.asp
<script language="JavaScript">
function search_salesreps() {
// sets variables that are used to center the window on the screen
var w = 400
var h = 300
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=yes,resizable=0,titlebar=yes'
// opens the new window using the variables above
var w = open ('', 'windowName', winprops);
w.document.open();
w.location.href="http://localhost/wcp/SearchSalesReps.asp";
}
</script>

This is the BODY tag of the SearchSalesReps.asp page:
<body style="background-color: #FFFFFF; color: #000000" onblur="window.close()">
Damian Small
Posted: 06/17/2002, 7:51 PM

Ive tried and Ive tried OnBlur doesnt seem to work with IE5. From your message looks like it still doesnt with IE6. You may want to check out this site. All you ever wanted to know about popup windows.
http://www.datacreek.com/design/pop-winfaq.html

Regards Damian Small

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.