Re: Referencing css and javascript files
Re: Referencing css and javascript files
- Subject: Re: Referencing css and javascript files
- From: Greg Hulands <email@hidden>
- Date: Wed, 29 Oct 2003 08:15:52 +1000
Hi Colin,
Thanks for the reply. It now loads the style sheet relatively. But,
there is always a but, in the css file I have relative urls for images.
These images are not getting loaded. Does WO parse a css file, or
should I create a "StyleSheet Component" that will return the contents
of css file with the embedded WOResourceURL for each image?
Any help is greatly appreciated,
Regards,
Greg
On 29/10/2003, at 1:23 AM, Colin Clark wrote:
Hi Christopher and Greg,
If you've included your Javascript and CSS files in the
WebServerResources folder, you can use the WOResourceURL dynamic
element to refer relatively to these files. You can even embed a
WOResourceURL element within other tags, as I do to load my CSS file:
From the WOComponent HTML file:
<link href="<webobject name=styleSheetURL></webobject>" REL=stylesheet
TYPE=text/css TITLE="Global Style Sheet">
And the WOComponent definitions file:
styleSheetURL: WOResourceURL {
filename="myStyleSheet.css";
}
Hope that helps,
Colin
On Tuesday, October 28, 2003, at 12:37 AM, Christopher Payne wrote:
I too am a newbie to WO, and I had the same question. While I'm sure
there's probably an elegant way to establish relative references
within a WO component, I ended up using absolute references for my
includes and images. That way I didn't have to worry about getting
the files into Project Builder. Since the bulk of my site is static,
with only a small WO portion, this seemed easier in the long run.
-CTP
On Oct 27, 2003, at 9:14 PM, Greg Hulands wrote:
Hi,
I am a newbie to WO development and have got a component called
Template that lays out the page for me. In the head section for the
Template component, I am referencing javascript and css files, but
as yet cannot see to put my finger on how to reference it properly.
I have added the css and js files the same as I do with the images,
but because I can set the image in the inspector, I have no trouble.
Could anyone suggest how I accomplish this.
Thanks,
Greg
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
---
Colin Clark
Dynamic Web/Database Developer
Resource Centre for Academic Technology,
University of Toronto
(416) 946-7592 / email@hidden
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.