Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
BrowseDlgEx.aspx permission error
claye
I'm writing a web app where I want to be able to attach a link to a WorkSite document. In the WorkSite Web Application Integration Toolkit.pdf there's a sample of how to do this with the clientside callback function. I tried the code though and after the window launches and I select a few documents and hit OK, nothing happens but I get a javascript error saying that in Line 213, character 2 that Permission was denied.
I double checked the code and it doesn't seem like there are any syntax errors. Has anyone ran across this behavior before?
Thanks,
Clay
Find more posts tagged with
Comments
Migrateduser
Clay
This sound like a cross site scripting issue. which means your host application and worksite web is not in same domain or port. In order to use the WSW browsedlgEX you need to ensure that both are either installed on samebox or if they are on different box then you need to make sure they are in same domain e.g.
http://worksite.yourdomain.com
http://yourapp.yourdomain.com
-
or
http://yourdomain.com/worksiteweb
http://yourdomain.com/yourapp
If your case is the first case you may also need to set "window.domain = "yourdomain.com" - in your javascript file as well one of WSW javascript file ( e..g you can set it in includes\common.js file - This file is included in all dialogs)
Let me know if you still have issues
Thanks
claye
Well, our WorkSite Web box is at
http://laextranet1/worksite
, so that's inside the domain and shouldn't be a problem. The other box is
http://laitdev
.
On the app, I have anonymous access off, using Windows Authentication. I tried calling the app using the whole domain.com in the address, and other than prompting me for credentials, it didn't change anything. I still get the permission issue.
Migrateduser
Clay
Thats precisely is your issue. Your domains are different (at least in the eye of IE) .... You need to call them as
http://laextranet1.company.com/worksite
http://laitdev.company.com
and don't forget to add window.domain = "company.com" in your javascript files
Good luck
SteveClements
Is there anyway around this error?
So I can simply allow my worksite server and website server to have access to each others JS. I know why this is blocked, but there must be a setting to allow cross site script access.
I have tried adding the domain to my local host file to replicate what was required above, but that didnt work...
Thx
Steve
Migrateduser
Steve
You can include window.domain = "yourbasedomain.com" in the javascript on both site so they will trust each other Assume you have sites site1.yourbasedomain.com and site2.basedomain.com.
Thanks
Sheetal
www.docstree.com
sheetal@docstree.com
SteveClements
You can include window.domain = "yourbasedomain.com" in the javascript on both site so they will trust each other Assume you have sites site1.yourbasedomain.com and site2.basedomain.com.
Do you mean document.domain = "yourbasedomain.com" ??
I have done this and found that it works but I get another error when the dialog loads "Access denied" Line 368 in menu.js
Menu.prototype.getMeasureDocument = function () {
if ( this.isShown() && this._drawn )
return this.getDocument();
var mf = Menu._measureFrame;
if ( mf == null ) {
// should be top document
mf = Menu._measureFrame = document.createElement("IFRAME");
var mfs = mf.style;
mfs.position = "absolute";
mfs.visibility = "hidden";
mfs.left = "-100px";
mfs.top = "-100px";
mfs.width = "10px";
mfs.height = "10px";
mf.frameBorder = 0;
mf.scrolling = 'no';
mf.src=virtualPath() + '/images/blankicon.gif';
document.body.appendChild( mf );
}
/************************************
Error line here....*/
var d = mf.contentWindow.document
/*************************************/
if ( Menu._measureMenu == this && !this._measureInvalid )
{
return d;
}
d.open( "text/html", "replace" );
d.write( this.toHtml() );
d.close();
Menu._measureMenu = this;
this._measureInvalid = false;
return d;
};
if I just click through the error then there doesnt seem to be a problem, but its a issue none the less.
Thx for you help...
Steve