473,411 Members | 1,982 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,411 software developers and data experts.

Access Denied

I have a ie window that launches a pop up window with no menus/toolbars
nothing just the page. When I run an bookmarklet on main window it works
fine but when I try running this on the popup I get an access denied error.
All the javascript is doing is getting innertxt from a textbox. It works
fine when main window is done but when popup is used it does not work. If
anybody can help would greatly appreciate it.
Jun 27 '08 #1
4 1579
Chico Che wrote:
I have a ie window that launches a pop up window with no menus/toolbars
nothing just the page. When I run an bookmarklet on main window it works
fine but when I try running this on the popup I get an access denied error.
All the javascript is doing is getting innertxt from a textbox. It works
fine when main window is done but when popup is used it does not work. If
anybody can help would greatly appreciate it.
Looking at your code, I see that your problem is with ..... oh wait,
there is no code to look at. In that case, I'm going to take a guess at
the problem being on line 37.
Jun 27 '08 #2
Stevo <no@mail.invalidwrote in news:g3*************@news.t-online.com:
Chico Che wrote:
>I have a ie window that launches a pop up window with no
menus/toolbars nothing just the page. When I run an bookmarklet on
main window it works fine but when I try running this on the popup I
get an access denied error. All the javascript is doing is getting
innertxt from a textbox. It works fine when main window is done but
when popup is used it does not work. If anybody can help would
greatly appreciate it.

Looking at your code, I see that your problem is with ..... oh wait,
there is no code to look at. In that case, I'm going to take a guess
at the problem being on line 37.
My bad here is the code:

[InternetShortcut]
URL=javascript: var d=document;var df = document.frames;var screen = "Not
Found"; var id = "@$@OBJ00002[1]";if(df.length != 0){df[0].focus();for (f=
0; f< df.length;f++){var scrvalue = df[f].document.getElementById(id);if
(scrvalue != null){screen = scrvalue.innerText;}}}else{var scrvalue =
d.getElementById(id);if (d!= null){screen = scrvalue.innerText}}alert
(screen);
Modified=307DA79EA1BBC10110
IconIndex=3
IconFile=C:\WINNT\System32\url.dll
Jun 27 '08 #3
Chico Che wrote:
Stevo wrote:
>Chico Che wrote:
>>I have a ie window that launches a pop up window with no
menus/toolbars nothing just the page. When I run an bookmarklet on
main window it works fine but when I try running this on the popup I
get an access denied error. All the javascript is doing is getting
innertxt from a textbox. It works fine when main window is done but
when popup is used it does not work. If anybody can help would
greatly appreciate it.
[...]

[...] var d=document;var df = document.frames;var screen = "Not
Found"; var id = "@$@OBJ00002[1]";if(df.length != 0){df[0].focus();for (f=
0; f< df.length;f++){var scrvalue = df[f].document.getElementById(id);if
(scrvalue != null){screen = scrvalue.innerText;}}}else{var scrvalue =
d.getElementById(id);if (d!= null){screen = scrvalue.innerText}}alert
(screen);
The code doesn't handle the case that `scrvalue' is not an object reference
(e.g. is `null) because there is no element with that ID. The assignment

screen = scrvalue.innerText;

results in a TypeError (in IE: "Object expected") then. This is what
happened when I used the bookmarklet on an arbitrary document in
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; ...; .NET CLR 1.1.4322;
..NET CLR 2.0.50727)".

Anything else is specific to the document you are viewing; you should post
the URL of the opener. However, a likely cause of the error message is that
the supposed frame's content document is accessed through a domain different
from the domain of the popup document. This would be a security precaution,
by design, and cannot be reliably worked around.

Also, `document.frames' should be `window.frames', and `screen' should be
something else (as there is a host-defined property of the Global Object
with that name already).
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
Jun 27 '08 #4
On Jun 24, 2:29 pm, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
Chico Che wrote:
Stevo wrote:
Chico Che wrote:
Also, `document.frames' should be `window.frames', and `screen' should be
something else (as there is a host-defined property of the Global Object
with that name already).
Alternatively, the code can be wrapped in a function:-

(function(){ /* bookmarklet code here */ })();

To avoid polluting or colliding with global namespace.

Garrett
PointedEars
Jun 27 '08 #5

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

Similar topics

2
by: calfdog | last post by:
Hello, Does anyone know a workaround for calling fireEvent. With the latest from Microsoft OS XP2 and Hot fixes to IE it now gives an "access denied" error in Python when called. Here is what...
0
by: Steve | last post by:
Hi, Yesterday I signed up for another dedicated linux server with the hosting company I use and I am having problems getting MySQL 4.1.3 working on it. I've tried just about everything I can...
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...
0
by: ASP.Confused | last post by:
The old message looked a little stale, so I am re-posting it here. Anybody have any ideas of what I could do?!? The previous responses to this question are below. If you want to look at the...
16
by: Brad | last post by:
After compiling my asp.net project I'm receiving a "BC31011 - Access is denied" error when attempting to run or debug. The only thing that seems to resolve problem is IISReset. After a reset my...
12
by: Ron Weldy | last post by:
I have a test server runinng 2003/IIS 6 with a mixture of asp and asp.net files. On my workstation I have a share set up to the folder where the web files reside. I am just doing quick and dirty...
3
by: Shailesh Humbad | last post by:
I figured out what was causing the "Access is Denied" error when calling functions from referenced DLLs in my service. I've tried to be very detailed, so bear with me. It turns out that...
3
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images ...
8
by: Jeremy Ames | last post by:
I am trying to move an application from my system to a new test system. I really should have tried an easier program first, but I didn't really have a chance. My application was originally written in...
0
by: Andy | last post by:
Thanks Peter, I thought I'd give an update on this problem. My application had 2 assemblies that contained classed for the Data access and business logic layer. It was on one of them that I was...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.