Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Javascript / Client Side Development

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.
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 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 dj dpass
Stephane Moriaux and his (less) old Mac already out of date

On May 13, 12:33 pm, ASM <stephanemoriaux.NoAd@wanadoo.fr.invalid>
wrote:

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?
funktacu@gmail.com said the following on 5/13/2007 3:07 PM:

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/
Randy Webb a crit :

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 dj dpass
Stephane Moriaux and his (less) old Mac already out of date

ASM said the following on 5/13/2007 7:06 PM:

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/

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/thre...>

--
Stephane Moriaux et son (moins) vieux Mac dj dpass
Stephane Moriaux and his (less) old Mac already out of date

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/thre...>

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/

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc