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 Mike Burati <mb...@bowstreet.com> on 2004/02/27 17:34:16 UTC

RE: JavaScript not working correctly when both portlets are in vi ew mode...

Sounds like the Javascript itself doesn't like having two copies of itself
on the same overall page...

You could try putting duplicate copies of it in two portions of a plain old
non-portal HTML page, to rule out anything to do with Pluto/portlets.

Can you send us the javascript or at least a fragment of the piece(s) that
you're expecting to do the auto-start of the slide show?

-----Original Message-----
From: Stephan Huber [mailto:shuber@ti.com]
Sent: Friday, February 27, 2004 11:31 AM
To: Pluto-user
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

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

Posted by Stephan Huber <sh...@ti.com>.
I realized the "auto-start" like this:

<body onLoad="dashBoardStart()">

dashBoardStart() is my JavaScript method to display my slide show 
sequence...

I will try your suggestion using a plain old HTML page and will tell you 
if the problem persists...

Thanks

- Stephan

Mike Burati wrote:
> Sounds like the Javascript itself doesn't like having two copies of itself
> on the same overall page...
> 
> You could try putting duplicate copies of it in two portions of a plain old
> non-portal HTML page, to rule out anything to do with Pluto/portlets.
> 
> Can you send us the javascript or at least a fragment of the piece(s) that
> you're expecting to do the auto-start of the slide show?
> 
> -----Original Message-----
> From: Stephan Huber [mailto:shuber@ti.com]
> Sent: Friday, February 27, 2004 11:31 AM
> To: Pluto-user
> 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