Wrox Programmer Forums
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 10th, 2004, 08:11 AM
Registered User
 
Join Date: Jan 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default server error

I've built a search facility for our intranet. When it's opened, the search
pane opens up down the left of the screen and tiles itself with the opener
window to fill the rest of the screen. As people click on the links in the
search pane, the pages are displayed in the opener window.

My problem is that many of the documents being searched are pdf's or xls' or
doc's and once one of these has been opened in the opener window the standard
window.opener.location syntax seems to cause the server to throw an error
(with no more information than the fact that it's that line of code which
causes the problem).

Can anyone explain why this is happening and perhapse supply a work around?

Cheers, Pete.
 
Old August 12th, 2004, 10:36 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Pete,

I think you lose window.opener.location, because the window is being replaced with a plugin - word / acrobat etc.

A possible way around it would be to replace the body of the opener with an iframe taking up the whole page...

Code:
function OpenLink(url){
    with(window.opener.document.body){
        style.margin = "0px";
        style.overflow = "hidden";
        innerHTML = "<iframe width=\"100%\" height=\"100%\" frameborder=\"no\" id=\"myFrame\" src=\"" + url + "\"></iframe>";
    }
}
HTH,

Chris






Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server Reg. SQL Server does not exist error Arsi SQL Server 2000 1 June 11th, 2008 11:20 AM
What is the error message for a 500 server error? chobo2 C# 2005 1 May 4th, 2008 03:11 AM
Error 500 -- Internal Server Error Vijay Kumar Servlets 2 March 26th, 2007 02:10 AM
server error when uploading to remote server ammweb ASP.NET 1.0 and 1.1 Basics 7 July 30th, 2006 01:51 AM
Error in Server when submitting this to the server zach2004 Classic ASP XML 0 March 8th, 2004 03:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.