It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

HELP!! Frame source "access denied"

HELP!! Frame source "access denied"

Postby kevinkan on Mon Oct 01, 2007 11:04 am

Hi all,

I'm facing a problem now.. In my intranet webpage, when a user clicks on a url, it is supposed to popup a new window and display a Word document from the file server. However, some users may not have access to the document. This is controlled by the normal windows security control on the server.

But right now, for the unauthorized users, when they click on the url, due to the denied access to the document, the popup window is opened with a blank screen. I am trying to create a alert popup "You do not have access to the file". How can I achieve this? How can I detect that the popup window cannot access the document?

Below is the script I am using:
-------------------------
var beIE = document.all?true:false
if (beIE){
NFW = window.open("","popFrameless","scrollbars,"+s)
NFW.blur()
window.focus()
NFW.resizeTo(popW,popH)
NFW.moveTo(leftPos,rightPos)
var frameString=""+
"<html>"+
"<head>"+
"<title>"+title+"</title>"+
"</head>"+
"<frameset rows='*,0' framespacing=0 border=0 frameborder=0>"+
"<frame name='top' src='"+urlPop+"' scrolling=auto>"+
"<frame name='bottom' src='about:blank' scrolling='no'>"+
"</frameset>"+
"</html>"
NFW.document.open();
NFW.document.write(frameString)
NFW.document.close()
}
-------------------------

Any help is deeply appreciated.
Thanks.


Cheers,
Kevin
--------
kevinkan
 
Posts: 0
Joined: Mon Oct 01, 2007 10:40 am

Who is online

Users browsing this forum: No registered users and 5 guests