viewing a webpage on the local intranet, but javascript is not running.

HI Guys,

hopefully a very simple one.  I have a webpage that is generated out of a program on a server, which saves the html file to a folder on the server.  The page comes up ok, but i get an access denied error when i go to submit the page...there is a whole heap of javascripting in the page.  is there some certain permissions i should be looking at??  the page runs fine when it is one a local folder on the pc.

your help is most appreciated.
maverickauAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

remorinaCommented:
This is a folder permission.
You need to set write permission on the folder where the page is being saved on the server.

There are several ways to do so, depends on whether you're using a shared hosting, IIS, etc..
0
maverickauAuthor Commented:
yeh the page gets saved ok....it is only when the page goes to run, the actual page comes up, but when you fill in the boxes and hit submit, you get an error down the bottom left corner of explorer saying access is denied...if i copy that same file to the local folder on a pc it comes up with the little yellow bar at the top of the page, where it says click here to enable java/active x....that is the part that is not happening on it when located on server.....I am working under admin account so have complete access to the page...
0
remorinaCommented:
The bar which shows at the top asking for permission to execute the javascript/active-x will show only when you're browsing a local file from a PC, not a server environment.
So even if you had that file on your local PC but placed in the wwroot for example and browsing through localhost, it wouldn't show the yellow bar.

Regarding the access is denied error, it seems that the script is trying to access a different domain.

If you're using ASP.NET ajax, you can check this article for more info and fixes
http://weblogs.asp.net/bleroy/archive/2007/01/31/how-to-work-around-the-quot-access-denied-quot-cross-domain-frame-issue-in-asp-net-ajax-1-0.aspx


Some further details about this error

The "Access Denied" error in any browser usually means that a script in one window or frame is  trying to access another window or frame whose document's domain is different from the document containing the script. What can seem odd about this is that you get this error in IE for Windows frequently when a script in one window generates a new window (with window.open()), and content for that other window is dynamically created from the same script doing the opening. The focus() method also triggers the error.
The error can also occur if scripts try to access objects, properties, or methods that have been locked down by Microsoft's security platoon. For instance, the document.styleSheets.rules property used to be accessible in IE 5 and IE 5.5, but is not in IE 6.
For the new window problem, there is a bit of history associated with the problem and workarounds. For example, the problem occurs frequently when the scripts are being run from the local hard disk. You get a clue about the situation in the titlebar of the new window: It forces an about:blank URL to the new window, which is a protocol:domain that differs from wherever your main window's script comes from. If, however, you put the same main window document on a server, and access it via http:, the problem goes away.
There is a workaround for the local-only problem: In the first parameter of the window.open() method call,  load a real document (even if it is a content-free HTML document) into the sub-window before using document.write() to generate content for the subwindow. The loading  action 'legitimizes' the window as coming from the same domain as your main window's document.
(This solution does not affect scripts that load a page from a secure server into a separate window or frame. An http: protocol in one window and https: in the other--even if from  the same server.domain--yield a security mismatch and "Access Denied." Setting the document.domain properties of both pages may solve the problem (but I am unable to test it for sure).)
For other situations (such as the document.styleSheets.cssRules problem, there are no workarounds, so you'll have to find another way around your task.
One more source of this error in IE occurs if you assign a too-long search string to a URL or a form (using the GET method) has lots of elements and data. The HTTP GET method has a built-in limit of approximately 512 characters. If you run into the problem, change the method to POST, which has no data length limit. But POST won't reflect the search string in the URL of the replacement page (in case you're expecting to parse that data as a way to convey data from one page to the next).

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
maverickauAuthor Commented:
perfect...thank you for the assist!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Browsers

From novice to tech pro — start learning today.