Don,
I'll assume you have already deployed the jPowered plugin on some page which I'll refer to as your original page.
It appears that once the page containing the plugin has been loaded then dynamically replacing the innerHTML of the div that gets displayed causes the plugin to malfunction.
So a simple solution is to replace the plugin on your original page with an IFRAME of the appropriate size and use a timer to refresh the IFRAME with a page that just contains the plugin.
So, first you create the macro that just displays some static text which scrolls using the jPowered plugin.
Then replace the static text with a Net.data function the outputs whatever dynamic text you desire.
Then on your original page, at the place where you want to put the scroller, insert the code for the IFRAME as follows -
<iframe id="scrollframe" src="scroll" height="255px" width="225px" frameborder="0"
onload="setTimeout('scrollframe.document.location.reload()',60000)">
</iframe>
In this example I've specified a delay of 60 seconds between refreshing the content.
Note that the default size for the jPowered scroller is 200 x 200 so the IFRAME needs to be a little bigger (255 x 225) to contain the scroller without scrollbars appearing.
In my example I used a single source file that had both the macro for the original page plus the "scroll" macro for the IFRAME.
Cheers, Peter
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Don Cavaiani
Sent: Wednesday, 30 December 2009 8:07 a.m.
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Net.Data scrolling message
Peter,
Below is the request from the user:
"I was doing some thinking about the sayings on the scrolling text on
the intranet. Can you make it so that it is a random saying from a list
you have saved somewhere? It stays the same for some time now. I think
it would be cool for it to randomly generate some saying that we have
picked out. What do you think?"
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Peter Connell
Sent: Tuesday, December 29, 2009 1:01 PM
To: 'Web Enabling the AS400 / iSeries'
Subject: Re: [WEB400] Net.Data scrolling message
Don,
Can you explain your aim in a more detail?
Peter
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Don Cavaiani
Sent: Wednesday, 30 December 2009 5:30 a.m.
To: web400@xxxxxxxxxxxx
Subject: [WEB400] Net.Data scrolling message
<!-- scrolling content -->
<div id="JPSCROLL_content" style="visibility:hidden; height: 100px;
width: 1px; overflow:hidden;"> OK-so much for the Bucks. Back to the
Packers - who'll want to face them in the playoffs?
Anyone have an example of 'plugging' in a variable set of messages -
maybe based on dates?
Obviously - I'm from Wisconsin!
Don F. Cavaiani
IT Manager
Amerequip Corp.
920-894-7063
"It's amazing what you can accomplish if you don't care who gets the
credit." Harry S. Truman
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list To
post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
Visit our website www.vedaadvantage.com. It has a new design with
improved navigation and search capabilities; and customer friendly
interface with more relevant insights and solutions to help you make
informed decisions.
########################################################################
#############
This correspondence is for the named person's use only. It may contain
confidential or legally privileged information, or both. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this correspondence in error, please immediately delete
it from your system and notify the sender. You must not disclose, copy
or rely on any part of this correspondence if you are not the intended
recipient.
Any views expressed in this message are those of the individual sender,
except where the sender expressly, and with authority, states them to be
the views of Veda Advantage.
If you need assistance, please contact Veda Advantage on either :-
Australia 1300-921-621 or New Zealand +64 9 367 6200
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list To
post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.