You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-user@portals.apache.org by Stephan Huber <sh...@ti.com> on 2004/02/27 17:30:33 UTC

JavaScript not working correctly when both portlets are in view mode...

Hi,

I've written a SlideShow portlet which uses some JavaScript in one of 
the JSPs to display a sequence of pictures in view mode.

That works very well...

When adding a second instance of the portlet (see below) both portlets 
are displayed correctly in view mode - but in this case the sequence of 
pictures isn't starting (you can only see the first picture of the slide 
show in both portlets but not the other pictures).

<application id="7">
   <definition-id>Slide</definition-id>
   <portlet id="1">
     <definition-id>Slide.SlideShow_1</definition-id>
   </portlet>
   <portlet id="2">
     <definition-id>Slide.SlideShow_2</definition-id>
   </portlet>
</application>

It seems that JavaScript isn't starting correctly when both portlets are 
displayed.
The other point is that when switching to edit mode in one of the two 
portlets, the edit mode is displayed while the other portlet is still in 
view mode. In this case the portlet which is now in view mode displays 
the slide show correctly...

Only when both portlets are in view mode nothing happens.

Any ideas?

Best Regards

- Stephan

Re: JavaScript not working correctly when both portlets are in view mode...

Posted by Jeff Linwood <je...@greenninja.com>.
Hi,

Did you use the JSP namespace tag for any JavaScript variables or methods
embedded in the HTML? Otherwise, you could have two JavaScript variables
with the same name, two methods, etc.

Jeff
----- Original Message ----- 
From: "Stephan Huber" <sh...@ti.com>
To: "Pluto-user" <pl...@jakarta.apache.org>
Sent: Friday, February 27, 2004 10:30 AM
Subject: JavaScript not working correctly when both portlets are in view
mode...


> Hi,
>
> I've written a SlideShow portlet which uses some JavaScript in one of
> the JSPs to display a sequence of pictures in view mode.
>
> That works very well...
>
> When adding a second instance of the portlet (see below) both portlets
> are displayed correctly in view mode - but in this case the sequence of
> pictures isn't starting (you can only see the first picture of the slide
> show in both portlets but not the other pictures).
>
> <application id="7">
>    <definition-id>Slide</definition-id>
>    <portlet id="1">
>      <definition-id>Slide.SlideShow_1</definition-id>
>    </portlet>
>    <portlet id="2">
>      <definition-id>Slide.SlideShow_2</definition-id>
>    </portlet>
> </application>
>
> It seems that JavaScript isn't starting correctly when both portlets are
> displayed.
> The other point is that when switching to edit mode in one of the two
> portlets, the edit mode is displayed while the other portlet is still in
> view mode. In this case the portlet which is now in view mode displays
> the slide show correctly...
>
> Only when both portlets are in view mode nothing happens.
>
> Any ideas?
>
> Best Regards
>
> - Stephan
>