link to css or javscript files in workspace?

9 views
Skip to first unread message

gordong

unread,
Jul 1, 2011, 11:48:50 AM7/1/11
to PBworks API
Hi,
is it possible link to uploaded css and javascript files, residing
in a workspace?

Rather than copying and pasting css and javascript into the
workspace setting / CSS & JavaScript / Custom HTML field, I am
wondering if it is possible to upload these elements to the workspace
as separate files, and link to them in the Custom HTML field, to load
them at runtime. This ability would ease the development process.

For example, after uploading myCSS.css to a workspace, put:

<script language="javascript" type="text/javascript" src="http://
myworkspace.pbworks.com/myCSS.css"></script>

into the custom HTML field.


The problem I encounter trying this strategy is that there seems to
be no way to get a direct link to a file in the pbworks workspace...

Thanks for your input,
Gordon

Eileen Xie

unread,
Jul 1, 2011, 12:52:59 PM7/1/11
to PBworks API
If your workspace package includes the ability to set custom CSS and
JavaScript, you can access the documentation for the API at:

https://WORKSPACENAME.pbworks.com/api_v2/op/DescribeOp/desc/SetWikiCustomHead

- Eileen

gordong

unread,
Jul 1, 2011, 1:35:33 PM7/1/11
to PBworks API
Thank you, Elieen!

well, I'm not sure I understand what you mean: I have a classroom
license, and I do have the ability to paste css and javascript into
the Settings / CSS & Javascript Custom HTML field. Is that the
capability you are referring to? (I thought all licenses have this
capability, even the free one...)

But this call looks like it sends text which represents CSS or
Javascript to the system. That's not the same as linking to a file
uploaded to the workspace.

Is there is no way to obtain a direct link to a file which resides in
the workspace? No matter how I try to construct a link to a file I
have uploaded, it always directs me to a file download page...

thanks for your further clarifications,
Gordon

On Jul 1, 11:52 am, Eileen Xie <eileen....@pbwiki.com> wrote:
> If your workspace package includes the ability to set custom CSS and
> JavaScript, you can access the documentation for the API at:
>
> https://WORKSPACENAME.pbworks.com/api_v2/op/DescribeOp/desc/SetWikiCu...

Jason Nguyen

unread,
Jul 1, 2011, 12:58:33 PM7/1/11
to pbwik...@googlegroups.com
That's not how you'd want to include CSS anyway. It'd be something like this:

<LINK REL=StyleSheet HREF="style.css" TYPE="text/css" MEDIA=screen>


--
You received this message because you are subscribed to the Google Groups "PBworks API" group.
To post to this group, send email to pbwik...@googlegroups.com.
To unsubscribe from this group, send email to pbwiki-api+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pbwiki-api?hl=en.


Jim Puls

unread,
Jul 1, 2011, 2:03:39 PM7/1/11
to graber...@gmail.com, PBworks API
You can always copy the download link from the download page, right?

-> jp

gordong

unread,
Jul 1, 2011, 2:07:07 PM7/1/11
to PBworks API
sorry? yes, that should have been written with a javascript file in
the example. just a typo.

On Jul 1, 11:58 am, Jason Nguyen <dochuye...@gmail.com> wrote:
> That's not how you'd want to include CSS anyway. It'd be something like
> this:
>
> <LINK REL=StyleSheet HREF="style.css" TYPE="text/css" MEDIA=screen>
>

gordong

unread,
Jul 1, 2011, 5:40:20 PM7/1/11
to PBworks API
works perfectly. What can I say? Working on a phd has fried my
brain to the obvious!

Thanks!

On Jul 1, 1:03 pm, Jim Puls <j...@nondifferentiable.com> wrote:
>  You can always copy the download link from the download page, right?
>
> -> jp
>
> On Friday, July 1, 2011 at 10:35 AM, gordong wrote:
> > Thank you, Elieen!
>
> >  well, I'm not sure I understand what you mean: I have a classroom
> > license, and I do have the ability to paste css and javascript into
> > the Settings / CSS & Javascript Custom HTML field. Is that the
> > capability you are referring to? (I thought all licenses have this
> > capability, even the free one...)
>
> > But this call looks like it sends text which represents CSS or
> > Javascript to the system. That's not the same as linking to a file
> > uploaded to the workspace.
>
> > Is there is no way to obtain a direct link to a file which resides in
> > the workspace? No matter how I try to construct a link to a file I
> > have uploaded, it always directs me to a file download page...
>
> > thanks for your further clarifications,
> > Gordon
>
> > On Jul 1, 11:52 am, Eileen Xie <eileen....@pbwiki.com (http://pbwiki.com)> wrote:
> > > If your workspace package includes the ability to set custom CSS and
> > > JavaScript, you can access the documentation for the API at:
>
> > >https://WORKSPACENAME.pbworks.com/api_v2/op/DescribeOp/desc/SetWikiCu...
>
> > > - Eileen
>
> > > On Jul 1, 8:48 am, gordong <graber.gor...@gmail.com (http://gmail.com)> wrote:
>
> > > > Hi,
> > > >  is it possible link to uploaded css and javascript files, residing
> > > > in a workspace?
>
> > > >  Rather than copying and pasting css and javascript into the
> > > > workspace setting / CSS & JavaScript / Custom HTML field, I am
> > > > wondering if it is possible to upload these elements to the workspace
> > > > as separate files, and link to them in the Custom HTML field, to load
> > > > them at runtime. This ability would ease the development process.
>
> > > > For example, after uploading myCSS.css to a workspace, put:
>
> > > > <script language="javascript" type="text/javascript" src="http://
> > > > myworkspace.pbworks.com/myCSS.css (http://myworkspace.pbworks.com/myCSS.css)"></script>
>
> > > > into the custom HTML field.
>
> > > > The problem I encounter trying this strategy is that there seems to
> > > > be no way to get a direct link to a file in the pbworks workspace...
>
> > > > Thanks for your input,
> > > > Gordon
>
> > --
> > You received this message because you are subscribed to the Google Groups "PBworks API" group.
> > To post to this group, send email to pbwik...@googlegroups.com (mailto:pbwik...@googlegroups.com).
> > To unsubscribe from this group, send email to pbwiki-api+...@googlegroups.com (mailto:pbwiki-api+...@googlegroups.com).
Reply all
Reply to author
Forward
0 new messages