• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: External javascrpt file - referencing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: External javascrpt file - referencing


  • Subject: Re: External javascrpt file - referencing
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 21 Feb 2006 10:48:17 -0800

Hi John,


On Feb 21, 2006, at 8:40 AM, John Huss wrote:

The Javascript console shows this error when the javascript is executed:

"The requested URL /WebObjects/SalondataComparison.woa/Contents/ WebServerResources/sortTable.js was not found on this server"

But the file is there.

Where is "there"? I suspect you are misunderstanding where "there" is. That is a web server URL. So the file (on a Mac) needs to be at
/Library/WebServer/Documents/WebObjects/SalondataComparison.woa/ Contents/WebServerResources/sortTable.js


And if it is indeed "there" :-), check the permissions on it. It needs to be in the www or admin group (just compare to the other files there) so that Apache can access it.

If it is not there, you are probably missing a step in your build process. For Xcode you need to so a split install from the command line to copy this file into the Document Root. I always manage these resources myself, so I don't have a quick description of what to do off hand.


  I'm accessing it over https.  Does that have anything to do with it?

Not if https is working for other things and http and https are set for the same document root.


I put the javascript file in the Web Server Resources folder and added it to the Web Server target.

Here's the HTML:
<script src="<webobject name=sortTableURL></webobject>"></script>

And the binding:
sortTableURL: WOResourceURL {
    filename="sortTable.js";
}

In the source for the generated page it shows up as:

<script src="/WebObjects/SalondataComparison.woa/Contents/ WebServerResources/sortTable.js"></script>

It looks like the other links on the page have "/cgi-bin" as the first part of the URL, so could that be the problem?

Sort of. The links with /cgi-bin/ in them are being served by your application not by Apache. Offhand, I don't know why this one is different.


Chuck


--
Coming in 2006 - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects




_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: External javascrpt file - referencing
      • From: Jeffrey Schmitz <email@hidden>
References: 
 >External javascrpt file - referencing (From: "John Huss" <email@hidden>)
 >Re: External javascrpt file - referencing (From: "John Huss" <email@hidden>)

  • Prev by Date: Re: External javascrpt file - referencing
  • Next by Date: Re: External javascrpt file - referencing
  • Previous by thread: Re: External javascrpt file - referencing
  • Next by thread: Re: External javascrpt file - referencing
  • Index(es):
    • Date
    • Thread