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

question about "same origin policy"

Hi-
I have script that works fine when I run it from a server, but I need
to be able to load the page and have it work from my hard drive.
However, it seems the when the url changes from http://www.mydomain.com/default.html
to file:///D:/folder_name/default.html that the browser thinks the
frames are coming from different domains. I'm still pretty new to
javascript and I am wondering if there is a way around this so I can
load from my hard drive. I was looking into document.domain, but I am
not sure what I would set it to in this case or if it would even work.
Any thoughts or suggestions would be greatly appreciated.

May 13 '07 #1
7 1801
ASM
fu*********@gmail.com a écrit :
Hi-
I have script that works fine when I run it from a server, but I need
to be able to load the page and have it work from my hard drive.
However, it seems the when the url changes from http://www.mydomain.com/default.html
to file:///D:/folder_name/default.html that the browser thinks the
frames are coming from different domains.
Do you works with a PC ?
Do you works with Windows ?
Do you works with Windows XP ?
Do you works with Windows XP SP2 ?

Yes ?

Try with this line in your files :

<!-- saved from url(0013)about:internet -->
http://support.microsoft.com/kb/883866/

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
May 13 '07 #2
On May 13, 12:33 pm, ASM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
wrote:
funktacu...@gmail.com a écrit :
Hi-
I have script that works fine when I run it from a server, but I need
to be able to load the page and have it work from my hard drive.
However, it seems the when the url changes fromhttp://www.mydomain.com/default.html
to file:///D:/folder_name/default.html that the browser thinks the
frames are coming from different domains.

Do you works with a PC ?
Do you works with Windows ?
Do you works with Windows XP ?
Do you works with Windows XP SP2 ?

Yes ?

Try with this line in your files :

<!-- saved from url(0013)about:internet -->

http://support.microsoft.com/kb/883866/

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
That appears to be related to some sort of MS Acess issue, the problem
I am having seems to be some sort of cross domain issue. The error I
get when I run it locally is "Error: uncaught exception: Permission
denied to get property Window.processXML". Am I missing something?

May 13 '07 #3
fu*********@gmail.com said the following on 5/13/2007 3:07 PM:
On May 13, 12:33 pm, ASM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
wrote:
>funktacu...@gmail.com a écrit :
>>Hi-
I have script that works fine when I run it from a server, but I need
to be able to load the page and have it work from my hard drive.
However, it seems the when the url changes fromhttp://www.mydomain.com/default.html
to file:///D:/folder_name/default.html that the browser thinks the
frames are coming from different domains.
Do you works with a PC ?
Do you works with Windows ?
Do you works with Windows XP ?
Do you works with Windows XP SP2 ?

Yes ?

Try with this line in your files :

<!-- saved from url(0013)about:internet -->

http://support.microsoft.com/kb/883866/

That appears to be related to some sort of MS Acess issue,
Yes, and is the wrong KB article to link to. Search the c.l.j archives
for "Mark of the web" and you can read all about it. It won't solve your
problem though.
the problem I am having seems to be some sort of cross domain issue.
Yes, as the original page is on a server, the second page is on a
different domain (the local file system).
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 13 '07 #4
ASM
Randy Webb a écrit :
fu*********@gmail.com said the following on 5/13/2007 3:07 PM:
>On May 13, 12:33 pm, ASM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
wrote:
>>funktacu...@gmail.com a écrit :

Hi-
I have script that works fine when I run it from a server, but I need
to be able to load the page and have it work from my hard drive.
However, it seems the when the url changes
fromhttp://www.mydomain.com/default.html
to file:///D:/folder_name/default.html that the browser thinks the
frames are coming from different domains.

Do you works with Windows XP SP2 ?
Yes ?
Try with this line in your files :

<!-- saved from url(0013)about:internet -->

Search the c.l.j archives
for "Mark of the web" and you can read all about it. It won't solve your
problem though.
>the problem I am having seems to be some sort of cross domain issue.

Yes, as the original page is on a server, the second page is on a
different domain (the local file system).
We cannot more open in an iframe a file coming from another domain than
this of main page ?
In local my main page can by JS script open Google in its iframe
(Firefox 2.0.0.3)
In same situation I've understood IE Win XPSP2 won't it without that
famous mark. Isn't it the case ?

If it is to open a local file from a server, I hope that it is still
forbidden, even with a "mark" whatever it is.

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
May 13 '07 #5
ASM said the following on 5/13/2007 7:06 PM:
Randy Webb a écrit :
>fu*********@gmail.com said the following on 5/13/2007 3:07 PM:
>>On May 13, 12:33 pm, ASM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
wrote:
funktacu...@gmail.com a écrit :

Hi-
I have script that works fine when I run it from a server, but I need
to be able to load the page and have it work from my hard drive.
However, it seems the when the url changes
fromhttp://www.mydomain.com/default.html
to file:///D:/folder_name/default.html that the browser thinks the
frames are coming from different domains.

Do you works with Windows XP SP2 ?
Yes ?
Try with this line in your files :

<!-- saved from url(0013)about:internet -->

Search the c.l.j archives for "Mark of the web" and you can read all
about it. It won't solve your problem though.
>>the problem I am having seems to be some sort of cross domain issue.

Yes, as the original page is on a server, the second page is on a
different domain (the local file system).

We cannot more open in an iframe a file coming from another domain than
this of main page ?
You can open it, you just can't interact with it.
In local my main page can by JS script open Google in its iframe
(Firefox 2.0.0.3)
It is the opposite. Try opening a local page from a server page.
In same situation I've understood IE Win XPSP2 won't it without that
famous mark. Isn't it the case ?
No. You can open any page in the IFrame with IE, you just can't interact
with it.
If it is to open a local file from a server, I hope that it is still
forbidden, even with a "mark" whatever it is.
Yes, that is what is trying to be done and it is forbidden without a
"rape my computer" security setting.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 13 '07 #6
ASM
Randy Webb a écrit :
ASM said the following on 5/13/2007 7:06 PM:
>In local my main page can by JS script open Google in its iframe
In same situation I've understood IE Win XPSP2 won't it without that
famous MS "Mark of the web". Isn't it the case ?

No. You can open any page in the IFrame with IE, you just can't interact
with it.
Hope,
but I did mean *open "with JS script"*
And I heard IE would display a warning message in this case,
as I could understand here :
<http://groups.google.fr/group/comp.lang.javascript/browse_thread/thread/d4e777791c1d049e/b79f8bb5dff6755e?lnk=st&q=&rnum=1&hl=en#b79f8bb5df f6755e>
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
May 14 '07 #7
ASM said the following on 5/13/2007 7:58 PM:
Randy Webb a écrit :
>ASM said the following on 5/13/2007 7:06 PM:
>>In local my main page can by JS script open Google in its iframe In
same situation I've understood IE Win XPSP2 won't it without that
famous MS "Mark of the web". Isn't it the case ?

No. You can open any page in the IFrame with IE, you just can't
interact with it.

Hope,
but I did mean *open "with JS script"*
And I heard IE would display a warning message in this case,
as I could understand here :
<http://groups.google.fr/group/comp.lang.javascript/browse_thread/thread/d4e777791c1d049e/b79f8bb5dff6755e?lnk=st&q=&rnum=1&hl=en#b79f8bb5df f6755e>
The MOTW is one solution to that problem. The other, now, is to allow
Active Content to run from CD\Local Drive. One has security implications
allowing script to run locally, the other has the implied notion it is
running locally when it isn't. Six of one, half a dozen of the other.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 14 '07 #8

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

Similar topics

3
by: Dave Hammond | last post by:
Hi All, This one is a bit bizarre. My understanding of "Access is denied" with respect to window.moveTo is that it results from a request which would move a portion of the window off screen. ...
6
by: PaulR | last post by:
We have seen this a lot, but have just experienced the opposite to what we have always seen previously, so this has prompted me to ask a high level - why do we get this behaviour? If we re-write...
3
by: Dmitri Shvetsov | last post by:
Hi, Maybe somebody knows why it's happening? I wrote a C# Windows Application working with the remote database through a DataSet. It works cool from my computer but when I gave this...
0
by: matt.delvecchio | last post by:
hey all, recently i was getting this error in my apps: Configuration Error Description: An error occurred during the processing of a configuration file required to service this request....
1
by: Charlie | last post by:
I am trying to make an XMLHttpRequest which violates the default "same- origin"policy in Firefox. I checked the archives and found a method that should work but it does not. Below is the test code...
19
by: glchin | last post by:
Does a compiler guarantee that the variable w below is placed on an eight-byte aligned address? void myFunction( long iFreq ) { const double w = two_pi * iFreq; ... ... }
3
by: Willy | last post by:
I have a website that uses querystrings on a certain page to show multiple contents. I have created mapped pages to hide the gory details of these querystrings. So instead of...
9
AmberJain
by: AmberJain | last post by:
Hello, What is the difference between --------> 1. clrscr(); // defined in various header files 2. system("cls"); //available in stdio.h in bloodshed dev c++ Well,...
2
by: sabbadin12 | last post by:
Hi, I'm going to work on an application that uses a postgreSQL database so that it can uses SQLServer 2005. I think I solved most problems on the programming side, but I still have some doubts...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.