473,320 Members | 2,000 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Access denied not a cross-host issue

Please take a look at this google artcle:

http://groups.google.com/groups?hl=e...mtel.net#link9

The op was having trouble with access denied using resizeTo. I am having the same issue
but the explanations in this article don't seem to apply here. I am not trying to
resize a window with content from a different server. This issue lies here.

What I do is make a popup window in a manner that I was given here. I like it
better then what I had. Here it is:

<script language="javascript" type="text/javascript">
<!-- Begin
// Set the url of the banner popup window page
var theURL = '<%="/redir/default1.asp?pg=" & Server.URLEncode(strsnd1) & "&splt=" & splt1%>';

// Set the title of the popup window
var title = 'Warning';

// Set the size of the popup window
var windowWidth = 715; // cannot be less than 100
var windowHeight = 360; // cannot be less than 100

// Set the position of the popup window
var windowX = 35;
var windowY = 200;

// Set true to auto-center (positions will be ignored)
var autocenter = true;

// Set true for popup to close when launch page does
var autoclose = true;

var s = 'width='+windowWidth+',height='+windowHeight;
var beIE = ua.ie;
var done = new Object('no');

if (autocenter){
windowX = (window.screen.width-windowWidth)/2;
windowY = ((window.screen.height-windowHeight)/2)+50;
}

function doAgilePopup(){
if (beIE){
var frameString = [
'<html>',
'<head>',
'<title>'+title+'</title>',
'</head>',
'<frameset rows="*,0" framespacing="0" border="0" frameborder="0">',
'<frame name="top" src="'+theURL+'" scrolling="no" />',
'<frame name="bottom" src="about:blank" scrolling="no" />',
'</frameset>',
'</html>'
].join('\n');
window.newWindowHtml = frameString;
agilePopper = window.open('javascript:opener.newWindowHtml','pop Agile','fullscreen=yes,'+s);
agilePopper.blur();
window.focus();
try{
if (typeof(agilePopper) == 'object'){
agilePopper.resizeTo(windowWidth,windowHeight);
agilePopper.moveTo(windowX,windowY);
}
}
catch(e){ alert('Cant\'t move window'); }
}
else{
agilePopper=window.open(theURL,'popAgile','scrollb ars=no,'+s);
agilePopper.blur();
window.focus();
agilePopper.resizeTo(windowWidth,windowHeight);
agilePopper.moveTo(windowX,windowY);
}
agilePopper.focus();
if (autoclose)
window.onunload = function(){ agilePopper.close(); }
done = 'okay';
}
// End -->
</script>

You can see I try catch where the issue occurs. I know that it is accessed denied because that is what
the javascript exception says. Any way this does NOT occur all the time. If I access this page directly
then I get this error message. But if I access this page from links on my server I do NOT. Is that the
issue? The other host that I am accessing is called (none) and that is enough to throw this access
denied error? The trouble is the page appears fine and everthing works except the resizing and
moveto. And then they work when the page has a Referrer from my site. Thanks for any further
light on this issue and any suggestions how to work around this (besedes chucking it) would be greatly
appreciated.

--
George Hester
_________________________________

Jul 23 '05 #1
7 3269
George Hester wrote:
Please take a look at this google artcle:

http://groups.google.com/groups?hl=e...mtel.net#link9

[...]

The issue seems to belong very much to IE rather than to JavaScript,
perhaps you'll get more information from an IE-centric group?

The general consensus seems to be don't use popups at all, much less
try to move and re-size them. Loading scripts from the local machine
also seems to cause problems in IE, but I'm no IE guru and not aware of
all the issues it has.

Cheers, Rob.
Jul 23 '05 #2
"George Hester" <he********@hotmail.com> wrote:
Please take a look at this google artcle:

http://groups.google.com/groups?hl=e...mtel.net#link9

The op was having trouble with access denied using resizeTo. I am having the same issue
but the explanations in this article don't seem to apply here. I am not trying to
resize a window with content from a different server. This issue lies here.

What I do is make a popup window in a manner that I was given here. I like it
better then what I had. Here it is:

<snip />

Seems like if you opened the window with the size and position you
wanted you wouldn't have to worry about resizeTo and moveTo not
working.
http://msdn.microsoft.com/workshop/a...ods/open_1.asp

Regards,
Steve
Jul 23 '05 #3
"Steve van Dongen" wrote in message news:eh********************************@4ax.com...
"George Hester" <he********@hotmail.com> wrote:
Please take a look at this google artcle:

http://groups.google.com/groups?hl=e...mtel.net#link9

The op was having trouble with access denied using resizeTo. I am having the same issue
but the explanations in this article don't seem to apply here. I am not trying to
resize a window with content from a different server. This issue lies here.

What I do is make a popup window in a manner that I was given here. I like it
better then what I had. Here it is:

<snip />

Seems like if you opened the window with the size and position you
wanted you wouldn't have to worry about resizeTo and moveTo not
working.
http://msdn.microsoft.com/workshop/a...ods/open_1.asp

Regards,
Steve


Yes I tried that Steve. But guess what? It doesn't work right. If I set the open statement like this:

//
var s = 'width='+windowWidth+',height='+windowHeight+',lef t='+windowX+',top='+windowY;
//
agilePopper = window.open('javascript:opener.newWindowHtml','pop Agile','fullscreen=yes,'+s);
//

then the agilePopper opens fullscreen. Just as the statement says it should. The dimension and
placement is ignored.

There is one other thing you may find interesting. The way this works is when a page (ASP) is
accessed and if a session variable has not been previously set then this page is accessed to cause this
popup to appear. At this point the link is in this form:

http://www.mydomain.com/more5/more5.asp

This popup will be a relatively small window with its parent as the background to it. You can also
move the child around you jast cannot close it. The parent can be closed but this obviously destroys
the child so in any case the options avaiable in the child MUST be chosen to proceed or the user ends
up nowhere.

Now this link above CAN be accessed directly and there is no issue. The popup behaves admirably.
But if the client tried to access the page directly like this:

http://www.mydomauin.com/more5/more5...x+469&rdr=cube

then I get the "access denied." The user wouldn't even know anything untoward happened if they had
debugging disabled because the popup opens full screen causing the parent to be behind it and so
hidden which is where the error message appears. The alert box you see I make is also unnoticeable.

So I think it has something to do with accessing a file namely the image "mc18045.jpg" or the encoding
that is set into the javascript statements. If I am unclear about something let me know and I can
try to explain the issue better. And any further suggestions will always be taken with the best
of consideration.

George Hester
_________________________________

Jul 23 '05 #4
"RobG" <rg***@iinet.net.auau> wrote in message news:41***********************@per-qv1-newsreader-01.iinet.net.au...
George Hester wrote:
Please take a look at this google artcle:

http://groups.google.com/groups?hl=e...mtel.net#link9

[...]

The issue seems to belong very much to IE rather than to JavaScript,
perhaps you'll get more information from an IE-centric group?

The general consensus seems to be don't use popups at all, much less
try to move and re-size them. Loading scripts from the local machine
also seems to cause problems in IE, but I'm no IE guru and not aware of
all the issues it has.

Cheers, Rob.


Every browser has their own idiosynchrosies with JavaScript. That is the nature of the beast. I don't
think posting my question here was wrong the answer may just not be known.

Thanks.

George Hester
_________________________________

Jul 23 '05 #5
"George Hester" <he********@hotmail.com> wrote:
"Steve van Dongen" wrote in message news:eh********************************@4ax.com...
"George Hester" <he********@hotmail.com> wrote:
>Please take a look at this google artcle:
>
>http://groups.google.com/groups?hl=e...mtel.net#link9
>
>The op was having trouble with access denied using resizeTo. I am having the same issue
>but the explanations in this article don't seem to apply here. I am not trying to
>resize a window with content from a different server. This issue lies here.
>
>What I do is make a popup window in a manner that I was given here. I like it
>better then what I had. Here it is:

<snip />

Seems like if you opened the window with the size and position you
wanted you wouldn't have to worry about resizeTo and moveTo not
working.
http://msdn.microsoft.com/workshop/a...ods/open_1.asp

Regards,
Steve


Yes I tried that Steve. But guess what? It doesn't work right. If I set the open statement like this:

//
var s = 'width='+windowWidth+',height='+windowHeight+',lef t='+windowX+',top='+windowY;
//
agilePopper = window.open('javascript:opener.newWindowHtml','pop Agile','fullscreen=yes,'+s);
//

then the agilePopper opens fullscreen. Just as the statement says it should. The dimension and
placement is ignored.


That's weird.

I didn't notice the fullscreen option in your window.open call before.
The answer to your original question is taht In IE6 SP1, for security
reasons, full screen windows cannot be resized by script.

Regards,
Steve
Jul 23 '05 #6
"Steve van Dongen" <st*****@hotmail.com> wrote in message news:eh********************************@4ax.com...
"George Hester" <he********@hotmail.com> wrote:
Please take a look at this google artcle:

http://groups.google.com/groups?hl=e...mtel.net#link9

The op was having trouble with access denied using resizeTo. I am having the same issue
but the explanations in this article don't seem to apply here. I am not trying to
resize a window with content from a different server. This issue lies here.

What I do is make a popup window in a manner that I was given here. I like it
better then what I had. Here it is:

<snip />

Seems like if you opened the window with the size and position you
wanted you wouldn't have to worry about resizeTo and moveTo not
working.
http://msdn.microsoft.com/workshop/a...ods/open_1.asp

Regards,
Steve


OK I fugured it out. You see IIS In Windows 2000 when passing a URL always passes the URL
such that certain characters are changed. It does this to a space changes it to + and it does it to . changes it to %2E. Therefore if you receive the URL in a different page using Request.QueryString('paramater') you will get the URL with those characters changed. It also does it to : but that one isn't necessary here to go into.

Anyway this is how I was passing the URL and in the receiving ASP I used Server.URLEncode on it. This casued the percentages % to also be encoded to %25. So an image like this.jpg became
this%252Ejpg. Now this didn't stop the image from being displayed but JavaScript did not like it one
bit.

Access denied.

So I changed the encoding around a little bit to catch what IIS does when passing a URL as a
parameter.

George Hester
_________________________________

Jul 23 '05 #7
"Steve van Dongen" <st*****@hotmail.com> wrote in message news:r9********************************@4ax.com...
"George Hester" <he********@hotmail.com> wrote:
"Steve van Dongen" wrote in message news:eh********************************@4ax.com...
"George Hester" <he********@hotmail.com> wrote:

>Please take a look at this google artcle:
>
>http://groups.google.com/groups?hl=e...mtel.net#link9
>
>The op was having trouble with access denied using resizeTo. I am having the same issue
>but the explanations in this article don't seem to apply here. I am not trying to
>resize a window with content from a different server. This issue lies here.
>
>What I do is make a popup window in a manner that I was given here. I like it
>better then what I had. Here it is:
<snip />

Seems like if you opened the window with the size and position you
wanted you wouldn't have to worry about resizeTo and moveTo not
working.
http://msdn.microsoft.com/workshop/a...ods/open_1.asp

Regards,
Steve


Yes I tried that Steve. But guess what? It doesn't work right. If I set the open statement like this:

//
var s = 'width='+windowWidth+',height='+windowHeight+',lef t='+windowX+',top='+windowY;
//
agilePopper = window.open('javascript:opener.newWindowHtml','pop Agile','fullscreen=yes,'+s);
//

then the agilePopper opens fullscreen. Just as the statement says it should. The dimension and
placement is ignored.


That's weird.

I didn't notice the fullscreen option in your window.open call before.
The answer to your original question is taht In IE6 SP1, for security
reasons, full screen windows cannot be resized by script.

Regards,
Steve


Yes I know. That was OK until Windows XP SP2 now I don't know what is going to happen. I have
to put together that Op sys and see how it goes. The issue of a forced status bar may present a
problem. I like this thing because it gives me complete control over that segment of accessing the site.
And I mean complete control. I don't like people coming by just to have something to complain about.
So I was asked to guard the site and so I did.

Anyway I figured out the issue. If you look at what I said was the URL that caused the problem:

http://www.mydomauin.com/more5/more5...x+469&rdr=cube

that was actually wrong. That link does work correctly. Had a little sneaky stufff going on where in fact the link was looking like this:

http://www.mydomauin.com/more5/more5...x+469&rdr=cube

Accessed Denied.

The issue is Request.ServerVariables("URL) and Server.URLEncode in the more5.asp page. There is some funky encoding going on. It's the old issue of encoding and then encoding again. In JavaScript it would be called escaping and then escaping again. Which causes the problem. Here was the fix: (in VBScript Server-side)

<%
'
Response.Redirect "/Logon.asp?from=" & Replace(Server.URLEncode(s), "%252E", "%2E")
'
%>

This is not right it's a cobjob but will suffice for now until I can find out how to fix this Micrsooft
SNAFU.

http://support.microsoft.com/default...b;en-us;301464

--
George Hester
_________________________________

Jul 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jeff T. | last post by:
All, Is there any way to access a separate IE 6.0 browser process via the Javascript DOM ? For example, open IE once. Open IE again (not using File->New). Can the second IE browser/process...
1
by: Cindy Lee | last post by:
I'm trying to dynamically set the height of my Iframe. my https: main page is calling another https in an Iframe. But i get an access denied error from my javascript trying to call the parent...
4
by: Fabian von Romberg | last post by:
Hi, I have installed Sql Reporting Services on 2 machines, one is WIN 2000 PRO and the other one is WIN 2000 ADV. SERVER. When I try to access a report using the webbrowser, I get the following...
9
by: | last post by:
Hi All, I have allready tried to ask a similar question , but got no answer until now. In the meantime, I found, that I cannot understand some thread-settings for the Main() function . If I use...
1
by: | last post by:
Hello, I have a problem when I try to do this on a aspx page.. Is there anything wrong with this approach? This is the javascript function <Script Language='JavaScript'> function...
1
by: dana lees | last post by:
Hi, I have a frameset that contains 2 frames. The upper frame has a "print" button. The lower frame has been redirected to a URL that was sent to it in a QueryString. When trying to call...
0
by: matsla | last post by:
I have followed all guide lines to set up remote debugging but is it possible to do cross-domain remote debugging? I use same account/password on both computers (XP => 2003), added users to debug...
11
by: Une Bévue | last post by:
bon he voudrais m'essaye à écrire un widget, qui n'est autre qu'une page html faisant appel à XMLHttpRequest. pour l'instant mon Man_wgdt n'est qu'une co^pie du widget RDoc (pour documentation...
3
by: Simon | last post by:
Hi All, I'm hoping someone will have some words of wisdom for me regarding MS Clustering on Windows 2003. I have a service that runs on a cluster. During invocation it's supposed to...
18
by: Jeff Bigham | last post by:
Hi, I'm getting an "Access is denied" error in IE when I try to focus an input box with node.focus() My understanding is that should only happen when the domains are different of the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.