Page works in IE, but not in PWB

For general issues related to PWB v2.

Moderators: Tyler, Scott, PWB v2 Moderator

Post Reply
stegraham
Observer
Observer
Posts: 5
Joined: Tue Mar 23, 2004 6:27 am

Page works in IE, but not in PWB

Post by stegraham »

A resource which we use works fine in Internet Explorer, but is not working in PWB (we are using version 2). The page is a page in our autenticated intranet (so I cannot post a link to it ). It uses frames (Yak), and also quite a bit of javascript. The relevant code I include below - I didn't write it BTW. You arrive at this page if you click on a service to launch, a pop up window should appear with a MOTD, the user clicks the close button and the service should load in the original window. However, when you try this within PWB, the MOTD window opens but the service never loads in the original window. I think it may have somethign to do with the onBeforeUnload Javascript event. I know it's specific to IE, does PWB support this event? Or does anyone know what could be causing this problem?

Stephen

Code: Select all

<body>
<script language='JavaScript'>
function motd() {
var empty = ''
motdwin = window.open(empty,'motd','width=530,height=350,resizable=no,status=no')
var serviceLaunchStyle =iplanetGateway( '/style')
var serviceLaunchImages =iplanetGateway( '/images')
var servicesConnectHelpUrl = 'http://portalcontent.london.edu/portalhelp/Services/services.html'
var servicesErrorNoticeHelpUrl = 'http://portalcontent.london.edu/portalhelp/Login/Contact_Help_Desk/contact_help_desk.html'
var serviceNoticeHelpUrl = 'http://portalcontent.london.edu/portalhelp/Services/services.html'
motdwin.document.writeln("<html>")
motdwin.document.writeln("<head>")
motdwin.document.writeln("<title>Service Notice: London Business School Portal</title>")
motdwin.document.writeln("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>")
motdwin.document.writeln("<link rel='stylesheet' href='" + serviceLaunchStyle + "/styles.css'>")
motdwin.document.writeln("<link rel='stylesheet' href='" + serviceLaunchStyle + "/../framework/portal.css'>")
motdwin.document.writeln("</head>")
motdwin.document.writeln("<script language='Javascript'>")
motdwin.document.writeln("function closeNotice() {")
motdwin.document.writeln("window.opener.display()")
motdwin.document.writeln("}")
motdwin.document.writeln("</sc" + "ript>")
motdwin.document.writeln("<body onBeforeUnload='closeNotice()' bgcolor='#FFFFFF' style='margin: 10'>")
motdwin.document.writeln("<span class='h3' style='font: 30px'>Connect to Service</span><br>")
motdwin.document.writeln("<div class='hr2'><img height='1' width='1' src='/framework/images/transparent.gif'></div>")
motdwin.document.writeln("<span class='h2'>MESSAGE OF THE DAY</span><br>")
motdwin.document.writeln("<span class='txtEditorial1'><B>UPDATE 05/02/2004: </B>Merrill Lynch & Dresdner Kleinwort and Wasserstein research reports have now been withdrawn until further notice from the Investext service, following a change in these firms' aftermarket distribution policy.<br></span> ")
motdwin.document.writeln("<br><br class='spacer1'><br class='spacer2'>")
motdwin.document.writeln("<div class='hr2'><img height='1' width='1' src='/framework/images/transparent.gif'></div>")
motdwin.document.writeln("  <table class='padding1' cellspacing='0' cellpadding='0' border='0' width='441'>")
motdwin.document.writeln("  <tbody><tr> ")
motdwin.document.writeln("	<td align='right'>")
motdwin.document.writeln("<input onclick='self.close()' value='Close' id='close' class='ipButton1' type='button' name='close'>")
motdwin.document.writeln("	</td>")
motdwin.document.writeln("  </tr>")
motdwin.document.writeln("  <tr>")
motdwin.document.writeln("	<td height='7'></td>")
motdwin.document.writeln("  </tr>")
motdwin.document.writeln("</tbody></table>")
motdwin.document.writeln("<div class='hr2'><img height='1' width='1' src='/framework/images/transparent.gif'></div>")
motdwin.document.writeln("<br class='spacer2'>          ")
motdwin.document.writeln("</body>")
motdwin.document.writeln("</html>")
}
function display() {
window.location.href='http://infotrac.london.galegroup.com/itweb/lbs_itw'
}
motd()
</script>

</body>

Guest

Post by Guest »

Can a member of TeamSoftware Solutions comment on this? We, London Businesss School, have a one year license for the product.

Stephen

Scott
Site Admin
Site Admin
Posts: 2530
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

PWB uses the Internet Explorer Web Browser Control, in a similar fashion
that Internet Explorer does. In theory PWB should be 100% compatible with Internet Explorer. However, there is a bug confirmed by Microsoft when hosting the Web Browser Control, the OnBeforeUnload() is not fired.

http://support.microsoft.com/default.as ... 01&SD=MSKB

Thanks for pointing this out, I will work on the fix mentioned in the article, and should hopefully have a fix by the end of the week.

--Scott

Scott
Site Admin
Site Admin
Posts: 2530
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

I made the changes to PWB to fix the OnBeforeUnload event bug to the beta version PWB v2.05.

www.teamsoftwaresolutions.com/beta/PWBv205.zip

I am not convinced this is the solution to the problem as the bug deals mainly with confirmation of the closing the window. Please let me know if this fixes the problem.

--Scott

Scott
Site Admin
Site Admin
Posts: 2530
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

I just uploaded a new PWB v2.05 that should fix the problem.

The problem was PWB was detecting the web page closing via the "window.close" command, then immediately closing the window without giving it a chance to run the normal closing routines.

--Scott

stegraham
Observer
Observer
Posts: 5
Joined: Tue Mar 23, 2004 6:27 am

Post by stegraham »

Scott - thanks for all quick reponses and solution. The latest beta version does indeed solve the problem we were experiencing. Brilliant!

Stephen

Post Reply