You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Akshay Ahooja <ak...@gmail.com> on 2006/06/23 22:51:14 UTC

Javascript not working in Jetspeed-2

Hello,

I am generating a dynamic table which has sorting drop down menus created on
the fly using javascript (on the first row of the table).

The application is struts based but the javascript is not connected to
struts functionality in anyway. The javascript sorting is working fine as a
web app.

When I deploy it on Jetspeed-2 the drop down menus are not created
(javascript not working).

The sorting function is called in the following manner-

<body topmargin="0" bottommargin="0" onload="attachFilter(
document.getElementById('accountTable'), 3)">

Could not find anything about this on the site. Anyone know how to fix this?


Thanks,
Akshay

Re: Javascript not working in Jetspeed-2

Posted by Brice Lambi <br...@gmail.com>.
Just reference it from the root of the web server.  So the path would be
relative to the root of the web server.  So your tag should look like this:

<script src="/mywebapp/somedir/myfile.js"/>

Or you can do an absolute path like this:

<script src="http://myserver/mywebapp/somedir/myfile.js"/>

The javascript files are loaded by the client browser so they need to be
viewable and accessable from the client.


On 6/26/06, Akshay Ahooja <ak...@gmail.com> wrote:
>
> Hi,
>
> It seems only to work on the server machine. When I access it from other
> machines within the intranet the javascript does not show up.
>
>
> <script language="javascript" src="C:/Program Files/Apache Software
> Foundation/.../javascript.js"></script>
>
>
> Do I need to reference it with the computer name? I'm not sure why the
> above
> does not work since it is grabbing it right from the machine.
>
> Thanks,
>
> Akshay
>
>
>
> On 6/23/06, Akshay Ahooja <ak...@gmail.com> wrote:
>
> >  Thanks Brice,
> >
> > It works now.
> >
> > -Akshay
> >
> >
> >  On 6/23/06, Brice Lambi <br...@gmail.com> wrote:
> > >
> > > I noticed that the src attribute of a script tag in your html must be
> > > absolute and not relative.  I don't know if that will help.
> > >
> > >
> > > On 6/23/06, Akshay Ahooja <ak...@gmail.com> wrote:
> > > >
> > > > Hello,
> > > >
> > > > I am generating a dynamic table which has sorting drop down menus
> > > created
> > > > on
> > > > the fly using javascript (on the first row of the table).
> > > >
> > > > The application is struts based but the javascript is not connected
> to
> > > > struts functionality in anyway. The javascript sorting is working
> fine
> > > as
> > > > a
> > > > web app.
> > > >
> > > > When I deploy it on Jetspeed-2 the drop down menus are not created
> > > > (javascript not working).
> > > >
> > > > The sorting function is called in the following manner-
> > > >
> > > > <body topmargin="0" bottommargin="0" onload="attachFilter(
> > > > document.getElementById('accountTable'), 3)">
> > > >
> > > > Could not find anything about this on the site. Anyone know how to
> fix
> > >
> > > > this?
> > > >
> > > >
> > > > Thanks,
> > > > Akshay
> > > >
> > > >
> > >
> > >
> >
>
>

Re: Javascript not working in Jetspeed-2

Posted by Akshay Ahooja <ak...@gmail.com>.
Hi,

It seems only to work on the server machine. When I access it from other
machines within the intranet the javascript does not show up.


<script language="javascript" src="C:/Program Files/Apache Software
Foundation/.../javascript.js"></script>


Do I need to reference it with the computer name? I'm not sure why the above
does not work since it is grabbing it right from the machine.

Thanks,

Akshay



On 6/23/06, Akshay Ahooja <ak...@gmail.com> wrote:

>  Thanks Brice,
>
> It works now.
>
> -Akshay
>
>
>  On 6/23/06, Brice Lambi <br...@gmail.com> wrote:
> >
> > I noticed that the src attribute of a script tag in your html must be
> > absolute and not relative.  I don't know if that will help.
> >
> >
> > On 6/23/06, Akshay Ahooja <ak...@gmail.com> wrote:
> > >
> > > Hello,
> > >
> > > I am generating a dynamic table which has sorting drop down menus
> > created
> > > on
> > > the fly using javascript (on the first row of the table).
> > >
> > > The application is struts based but the javascript is not connected to
> > > struts functionality in anyway. The javascript sorting is working fine
> > as
> > > a
> > > web app.
> > >
> > > When I deploy it on Jetspeed-2 the drop down menus are not created
> > > (javascript not working).
> > >
> > > The sorting function is called in the following manner-
> > >
> > > <body topmargin="0" bottommargin="0" onload="attachFilter(
> > > document.getElementById('accountTable'), 3)">
> > >
> > > Could not find anything about this on the site. Anyone know how to fix
> >
> > > this?
> > >
> > >
> > > Thanks,
> > > Akshay
> > >
> > >
> >
> >
>

Re: Javascript not working in Jetspeed-2

Posted by Akshay Ahooja <ak...@gmail.com>.
Thanks Brice,

It works now.

-Akshay


On 6/23/06, Brice Lambi <br...@gmail.com> wrote:
>
> I noticed that the src attribute of a script tag in your html must be
> absolute and not relative.  I don't know if that will help.
>
>
> On 6/23/06, Akshay Ahooja <ak...@gmail.com> wrote:
> >
> > Hello,
> >
> > I am generating a dynamic table which has sorting drop down menus
> created
> > on
> > the fly using javascript (on the first row of the table).
> >
> > The application is struts based but the javascript is not connected to
> > struts functionality in anyway. The javascript sorting is working fine
> as
> > a
> > web app.
> >
> > When I deploy it on Jetspeed-2 the drop down menus are not created
> > (javascript not working).
> >
> > The sorting function is called in the following manner-
> >
> > <body topmargin="0" bottommargin="0" onload="attachFilter(
> > document.getElementById('accountTable'), 3)">
> >
> > Could not find anything about this on the site. Anyone know how to fix
> > this?
> >
> >
> > Thanks,
> > Akshay
> >
> >
>
>

Re: Javascript not working in Jetspeed-2

Posted by Brice Lambi <br...@gmail.com>.
I noticed that the src attribute of a script tag in your html must be
absolute and not relative.  I don't know if that will help.


On 6/23/06, Akshay Ahooja <ak...@gmail.com> wrote:
>
> Hello,
>
> I am generating a dynamic table which has sorting drop down menus created
> on
> the fly using javascript (on the first row of the table).
>
> The application is struts based but the javascript is not connected to
> struts functionality in anyway. The javascript sorting is working fine as
> a
> web app.
>
> When I deploy it on Jetspeed-2 the drop down menus are not created
> (javascript not working).
>
> The sorting function is called in the following manner-
>
> <body topmargin="0" bottommargin="0" onload="attachFilter(
> document.getElementById('accountTable'), 3)">
>
> Could not find anything about this on the site. Anyone know how to fix
> this?
>
>
> Thanks,
> Akshay
>
>