CSS & Web Design Forum  

Welcome to the CSS & Web Design Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
WM Media Banner

Supporters
Pos Software - POS hardware and Software to track, control and manage your inventory.
Web Templates - BoxedArt is the most reliable source for unlimited template downloads.

Directory Submission
WL Marketing - Your #1 source for building links

Go Back   CSS & Web Design Forum > Web Design > AJAX, Javascript & DOM
Reply
 
Thread Tools Search this Thread Display Modes
(#1)
Old
funktacular@gmail.com
Guest
 
Default question about "same origin policy" - 05-13-2007, 10:21 PM

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.

Reply With Quote
(#2)
Old
ASM
Guest
 
Default Re: question about "same origin policy" - 05-13-2007, 10:21 PM

funktacular@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
Reply With Quote
(#3)
Old
funktacular@gmail.com
Guest
 
Default Re: question about "same origin policy" - 05-13-2007, 10:21 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/
>
> --
> 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?

Reply With Quote
(#4)
Old
Randy Webb
Guest
 
Default Re: question about "same origin policy" - 05-13-2007, 10:21 PM

funktacular@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/
Reply With Quote
(#5)
Old
ASM
Guest
 
Default Re: question about "same origin policy" - 05-14-2007, 12:35 AM

Randy Webb a écrit :
> funktacular@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
Reply With Quote
(#6)
Old
Randy Webb
Guest
 
Default Re: question about "same origin policy" - 05-14-2007, 12:35 AM

ASM said the following on 5/13/2007 7:06 PM:
> Randy Webb a écrit :
>> funktacular@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/
Reply With Quote
(#7)
Old
ASM
Guest
 
Default Re: question about "same origin policy" - 05-14-2007, 12:35 AM

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
Reply With Quote
(#8)
Old
Randy Webb
Guest
 
Default Re: question about "same origin policy" - 05-14-2007, 12:35 AM

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/
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Hosting at Triple.com
vBulletin Skin developed by: vBStyles.com

Printing Company  Link Building Services