Go Back   Serif Software Forums > Design and Publishing > WebPlus

Notices

WebPlus Questions about using WebPlus for website design

Reply
 
Thread Tools Display Modes
Old 4th February 2011, 01:15 AM   #1
Archibald
Master
 
Archibald's Avatar
 
Join Date: Feb 2009
Location: England
Posts: 12,701
Archibald is a splendid one to beholdArchibald is a splendid one to beholdArchibald is a splendid one to behold
Default Horizontal Scroller

A short while ago, I posted a way of getting a vertical scroller (here). With some recent threads about scrolling marquees, I decided to do a horizontal version.

There are a number of scrollers around from sites such as Dynamic Drive, but you normally have to hand-code the HTML of the scroller content.

I decided to try a different approach so we can have all the layout tools of WebPlus available for the content. The content can include images, even Flash.

In the attached file, the content is placed on a page that I have named 'News' (news.html). This can be made any height and is where the content is placed.

The page named 'Two iframes' (two-iframes.html) contains two framed documents, both are the same size as the 'News' page. The width of the 'Two iframes' page is therefore twice the width of the 'News' page. The height of the page and iframes needs to be the same height as the 'News' page. Both iframes are set to display the 'News' page without scrollbars. Unlike the vertical scroller, it is necessary for the left-hand iframe to have an ID of ifrm_L (so the code can get the width).

The top-level page, currently the home page, has an iframe the same height as the other two pages, but of any desired width. This iframe is set to display the 'Two iframes' page without scrollbars.

There is an HTML fragment on the 'Two iframes' page that contains code for the <head> section of HTML. As there is no code for the <body>, 'Ignore page position' is ticked.

The code currently steps 2 pixels every 50 milliseconds. These are indicated by comments in the code, and can be edited.

The only other code added is also to 'Two iframes' page: press Alt+S to see the all the code for the page and find the line beginning <body . The placeholder __AddCode="PageInBodyTag" is replaced by:

Code:
onmouseover="clearTimeout(t)" onmouseout="newsStep()"
This code is only needed if you want the scroller to stop scrolling on mouse-over.

Having the two iframes on a page duplicates the news content so the scroller does not display blank before restarting. In my view this is a significant improvement over other scrollers.

Please let me know if any of the description is unclear or if anything does not work when you customise it.

File attached is WebPlus10 so users of WebPlus10, WebPlusX2, WebPlusX4 and WebPlusX5 should be able to open it.

5th Aug 2011: file attached below has been updated to give compatibility with WebPlusX5. If it is copied to another project file in WebPlus X5, it may be necessary to check the ID of the left iframe and ensure 'Write ID for this object' is set to 'Yes'.
Attached Files
File Type: wpp Horizontal Scroller5.wpp (80.5 KB, 343 views)
__________________
Archibald

Last edited by Archibald; 24th March 2012 at 03:49 PM. Reason: Uploaded version compatible with WebPlusx5
Archibald is offline   Reply With Quote
Old 4th February 2011, 01:36 AM   #2
nfc212
Master
 
nfc212's Avatar
 
Join Date: Sep 2009
Location: Cardiff
Age: 56
Posts: 12,918
nfc212 is a splendid one to beholdnfc212 is a splendid one to beholdnfc212 is a splendid one to behold
Default Re: Horizontal Scroller

Looks promising Archibald.

Stutters a little in FF but seems consistent in all the browsers here.

And it doesn't freeze up my mouse wheel.
__________________
Nigel

The Ferret - Using PHP and MySQL to create dynamic Web Plus sites
What is the difference between genius and stupidity? Genius has limits.
nfc212 is offline   Reply With Quote
Old 4th February 2011, 01:38 AM   #3
BrianE
Master
 
Join Date: Apr 2009
Location: California, USA
Posts: 11,156
BrianE is a jewel in the roughBrianE is a jewel in the rough
Default Re: Horizontal Scroller

Thanks, Archibald. Always nice to have quick options.
__________________
Brian
Intel Core i7 OC'd @ 4.8 GHz. 16 GB DDR3 RAM. 120 GB SSD. NVIDIA GTX 670, GTX 260. Windows 8 x64.
[Fix] Drop-Down Navigation on iOS Devices | [How To] Resize a Slider | [Demo] Animated Slider Gallery
BrianE is offline   Reply With Quote
Old 4th February 2011, 01:38 AM   #4
Archibald
Master
 
Archibald's Avatar
 
Join Date: Feb 2009
Location: England
Posts: 12,701
Archibald is a splendid one to beholdArchibald is a splendid one to beholdArchibald is a splendid one to behold
Default Re: Horizontal Scroller

Quote:
Originally Posted by nfc212 View Post
Stutters a little in FF but seems consistent in all the browsers here.
Hi Nigel,

Lots of code stutters in Firefox a few seconds after it loads. You are best advised to always use Internet Explorer .
__________________
Archibald
Archibald is offline   Reply With Quote
Old 4th February 2011, 02:10 AM   #5
nfc212
Master
 
nfc212's Avatar
 
Join Date: Sep 2009
Location: Cardiff
Age: 56
Posts: 12,918
nfc212 is a splendid one to beholdnfc212 is a splendid one to beholdnfc212 is a splendid one to behold
Default Re: Horizontal Scroller

Quote:
Originally Posted by Archibald View Post
Hi Nigel,

Lots of code stutters in Firefox a few seconds after it loads. You are best advised to always use Internet Explorer .
There's a lot more code that chokes in IE.
__________________
Nigel

The Ferret - Using PHP and MySQL to create dynamic Web Plus sites
What is the difference between genius and stupidity? Genius has limits.
nfc212 is offline   Reply With Quote
Old 4th February 2011, 10:20 AM   #6
Neil J
Senior Member
 
Neil J's Avatar
 
Join Date: Feb 2009
Location: UK
Age: 34
Posts: 1,428
Neil J is well on the road to greatness
Default Re: Horizontal Scroller

That's very cool, Archibald, and even better that it can still be styled using the WebPlus tools instead of html and css
__________________
Neil Judges ~ Free Portfolio Template
Neil J is offline   Reply With Quote
Old 4th February 2011, 10:27 AM   #7
mjh
Font of all Knowledge
 
mjh's Avatar
 
Join Date: Feb 2009
Location: Michigan USA
Posts: 71,250
mjh has a reputation beyond reputemjh has a reputation beyond reputemjh has a reputation beyond reputemjh has a reputation beyond reputemjh has a reputation beyond repute
Default Re: Horizontal Scroller

Quote:
Originally Posted by Neil J View Post
That's very cool, Archibald, and even better that it can still be styled using the WebPlus tools instead of html and css
I've got Archibald's vertical scroller on Carol's site and it is so much easier for her to edit than dealing with code.

For that, I truly appreciate Archibald's nifty contributions.
__________________
mjh

There is a scales icon on the left. It’s a forum user’s reputation.
When a user has helped you, please click on the scales and comment on their helpfulness to you.


---------------
T9900, 8 GB RAM, 512 vidram, WIN 7 Ult 64-bit - AOL 9
mjh is offline   Reply With Quote
Old 4th February 2011, 10:36 AM   #8
guardagujas
Regular Member
 
Join Date: Nov 2010
Location: Rome, Italy
Posts: 297
guardagujas is on a distinguished road
Default Re: Horizontal Scroller

Quote:
Originally Posted by Archibald View Post
A short while ago, I posted a way of getting a vertical scroller (here). With some recent threads about scrolling marquees, I decided to do a horizontal version.

There are a number of scrollers around from sites such as Dynamic Drive, but you normally have to hand-code the HTML of the scroller content.

I decided to try a different approach so we can have all the layout tools of WebPlus available for the content. The content can include images, even Flash.

In the attached file, the content is placed on a page that I have named 'News' (news.html). This can be made any height and is where the content is placed.

The page named 'Two iframes' (two-iframes.html) contains two framed documents, both are the same size as the 'News' page. The width of the 'Two iframes' page is therefore twice the width of the 'News' page. The height of the page and iframes needs to be the same height as the 'News' page. Both iframes are set to display the 'News' page without scrollbars. Unlike the vertical scroller, it is necessary for the left-hand iframe to have an ID of ifrm_L (so the code can get the width).

The top-level page, currently the home page, has an iframe the same height as the other two pages, but of any desired width. This iframe is set to display the 'Two iframes' page without scrollbars.

There is an HTML fragment on the 'Two iframes' page that contains code for the <head> section of HTML. As there is no code for the <body>, 'Ignore page position' is ticked.

The code currently steps 2 pixels every 50 milliseconds. These are indicated by comments in the code, and can be edited.

The only other code added is also to 'Two iframes' page, in the line beginning <body . The placeholder __AddCode="PageInBodyTag" is replaced by:

Code:
onmouseover="clearTimeout(t)" onmouseout="newsStep()"
This code is only needed if you want the scroller to stop scrolling on mouse-over.

Having the two iframes on a page duplicates the news content so the scroller does not display blank before restarting. In my view this is a significant improvement over other scrollers.

Please let me know if any of the description is unclear or if anything does not work when you customise it.

File attached is WebPlus10 so users of WebPlus10, WebPlusX2 and WebPlusX4 should be able to open it.
Archibald:

I just want to say that your generosity is extraordinary. People like you, or MJH, or Frank B., or Nigel, or like many others here in the Serif forum, makes this site an invaluable tool, and, even more important, a place where solidarity and generosity are common words!

Thank you!

(And, again, sorry for my bad english).
guardagujas is offline   Reply With Quote
Old 4th February 2011, 10:38 AM   #9
pj1000
Senior Member
 
pj1000's Avatar
 
Join Date: Feb 2010
Location: Bolton
Posts: 1,595
pj1000 is well on the road to greatness
Default Re: Horizontal Scroller

Perfect Archibald just what i needed
pj1000 is offline   Reply With Quote
Old 4th February 2011, 10:40 AM   #10
mjh
Font of all Knowledge
 
mjh's Avatar
 
Join Date: Feb 2009
Location: Michigan USA
Posts: 71,250
mjh has a reputation beyond reputemjh has a reputation beyond reputemjh has a reputation beyond reputemjh has a reputation beyond reputemjh has a reputation beyond repute
Default Re: Horizontal Scroller

Quote:
Originally Posted by guardagujas View Post
Archibald:

I just want to say that your generosity is extraordinary. People like you, or MJH, or Frank B., or Nigel, or like many others here in the Serif forum, makes this site an invaluable tool, and, even more important, a place where solidarity and generosity are common words!

Thank you!

(And, again, sorry for my bad english).
What I especially like about Archibald's 'stuff' is that he figures out ways to do things using the tools within WebPlus. Most are so simple even I learned how to use/implement many of them.
__________________
mjh

There is a scales icon on the left. It’s a forum user’s reputation.
When a user has helped you, please click on the scales and comment on their helpfulness to you.


---------------
T9900, 8 GB RAM, 512 vidram, WIN 7 Ult 64-bit - AOL 9
mjh is offline   Reply With Quote
Old 20th February 2011, 10:50 PM   #11
Archibald
Master
 
Archibald's Avatar
 
Join Date: Feb 2009
Location: England
Posts: 12,701
Archibald is a splendid one to beholdArchibald is a splendid one to beholdArchibald is a splendid one to behold
Default Re: Horizontal Scroller - Troubleshooting

The scroller uses three pages:
a) The page you want the scroller to appear on. In the file attached above this is 'Home' with file name 'index.html'.
b) An intermediate page that contains two framed documents (iframes). In the file attached above this is 'Two iframes' with file name 'two-iframes.html'.
c) A page that contains the objects to be displayed. In the file attached above this is 'News' with file name 'news.html'.

Troubleshooting:


1) View the 'News' page in WebPlus and preview page in browser to check it's OK.

2) View the 'Two iframes' page in WebPlus and preview page in browser. You should see the 'News' page duplicated side-by-side. If not, check the hyperlinks associated with both iframes are set to the site page 'News'. The iframes should be set to have no borders and no scrollbars. (Note: I am surprised previewing the page in a browser works because it is previewing one page inside another . . . . but it does work).

3) Preview site (not page) in browser and if necessary navigate to the page the scroller is on. If you do not see any scroller content, check the hyperlink associated with the iframe that displays the scroller is set to site page 'Two iframes'. (Note: this time previewing the page in a browser does not work).

4) If you see scroller content on the page where it is required, but it is not scrolling, go to the page 'Two iframes' and check that the ID of the left-hand iframe is "ifrm_L" (without the quotation marks), using right-click > ID . On the same page, check that the HTML code fragment that contains the scroller script is present. Check your browser does not have JavaScript disabled.
__________________
Archibald
Archibald is offline   Reply With Quote
Old 21st February 2011, 03:42 AM   #12
bbdas
Regular Member
 
Join Date: Feb 2011
Posts: 52
bbdas is on a distinguished road
Default Re: Horizontal Scroller - Troubleshooting

thanks for your concern and willingness to help.. i will check it out and get back. I must say wpx4 serif forum is full of support. keep up the good work. Hare Krishna
bbdas is offline   Reply With Quote
Old 21st April 2011, 03:25 PM   #13
WayneJohn
Regular Member
 
WayneJohn's Avatar
 
Join Date: Feb 2010
Location: Johannesburg, South Africa
Age: 54
Posts: 153
WayneJohn is on a distinguished road
Default Re: Horizontal Scroller

Thanks Archibald.

This is very nice, thank you.

I can widen it and tweek here and there. Just what I need.

WONDERFUL. Thanks.
WayneJohn is offline   Reply With Quote
Old 21st April 2011, 03:28 PM   #14
mjh
Font of all Knowledge
 
mjh's Avatar
 
Join Date: Feb 2009
Location: Michigan USA
Posts: 71,250
mjh has a reputation beyond reputemjh has a reputation beyond reputemjh has a reputation beyond reputemjh has a reputation beyond reputemjh has a reputation beyond repute
Default Re: Horizontal Scroller

Quote:
Originally Posted by WayneJohn View Post
Thanks Archibald.

This is very nice, thank you.

I can widen it and tweek here and there. Just what I need.

WONDERFUL. Thanks.
I agree......... those scrollers are quite a gift. They scroll and stop smoothly and are easier to install using pages and iframes than some other dedicated scripts.
__________________
mjh

There is a scales icon on the left. It’s a forum user’s reputation.
When a user has helped you, please click on the scales and comment on their helpfulness to you.


---------------
T9900, 8 GB RAM, 512 vidram, WIN 7 Ult 64-bit - AOL 9

Last edited by mjh; 21st April 2011 at 03:44 PM.
mjh is offline   Reply With Quote
Old 21st April 2011, 03:40 PM   #15
WayneJohn
Regular Member
 
WayneJohn's Avatar
 
Join Date: Feb 2010
Location: Johannesburg, South Africa
Age: 54
Posts: 153
WayneJohn is on a distinguished road
Default Re: Horizontal Scroller

Thanks guys...and gals.

I am fairly new to the forums, and before I only contacted Serif themselves. How stupid.

I suppose there is a place for the Serif guys, and don't get me wrong, they do help with some Serif related things, I agree.

But, WOW !!! The Serif Forums are just the Bees-knees.

After a while I got the impression that the Serif guys were just reading off a checklist - so-to-speak, going through that 99-point emergency checklist before flying into that mountain, instead of using your head, and pulling back on that stick and missing that damn mountain !!! - checklist on the floor... <<Experience matters.>>

Here in the forums you get real, down-to-earth, tried-and-tested answers.

I am thrilled !!!
WayneJohn is offline   Reply With Quote
Old 21st April 2011, 03:43 PM   #16
mjh
Font of all Knowledge
 
mjh's Avatar
 
Join Date: Feb 2009
Location: Michigan USA
Posts: 71,250
mjh has a reputation beyond reputemjh has a reputation beyond reputemjh has a reputation beyond reputemjh has a reputation beyond reputemjh has a reputation beyond repute
Default Re: Horizontal Scroller

Quote:
Originally Posted by WayneJohn View Post
Thanks guys...and gals.

I am fairly new to the forums, and before I only contacted Serif themselves. How stupid.

I suppose there is a place for the Serif guys, and don't get me wrong, they do help with some Serif related things, I agree.

But, WOW !!! The Serif Forums are just the Bees-knees.

After a while I got the impression that the Serif guys were just reading off a checklist - so-to-speak, going through that 99-point emergency checklist before flying into that mountain, instead of using your head, and pulling back on that stick and missing that damn mountain !!! - checklist on the floor... <<Experience matters.>>

Here in the forums you get real, down-to-earth, tried-and-tested answers.

I am thrilled !!!
And, on a good day, you'll even get some recipes, a fevv jokes and updates on family issues. So just make yourself comfortable and come back soon.
__________________
mjh

There is a scales icon on the left. It’s a forum user’s reputation.
When a user has helped you, please click on the scales and comment on their helpfulness to you.


---------------
T9900, 8 GB RAM, 512 vidram, WIN 7 Ult 64-bit - AOL 9
mjh is offline   Reply With Quote
Old 21st April 2011, 03:46 PM   #17
pj1000
Senior Member
 
pj1000's Avatar
 
Join Date: Feb 2010
Location: Bolton
Posts: 1,595
pj1000 is well on the road to greatness
Default Re: Horizontal Scroller

The serif guys get paid a set wage each week no matter if they help you or not so dont waste your time ringing them up just post on this forum as you usually get a reply in a few mins
pj1000 is offline   Reply With Quote
Old 21st April 2011, 03:49 PM   #18
WayneJohn
Regular Member
 
WayneJohn's Avatar
 
Join Date: Feb 2010
Location: Johannesburg, South Africa
Age: 54
Posts: 153
WayneJohn is on a distinguished road
Default Re: Horizontal Scroller

Thanks MJH and Lee.

I agree. Sometimes I get an answer in seconds. Serif can take up to 48 hours if you are lucky.

Regards.
WayneJohn is offline   Reply With Quote
Old 22nd April 2011, 12:50 AM   #19
Archibald
Master
 
Archibald's Avatar
 
Join Date: Feb 2009
Location: England
Posts: 12,701
Archibald is a splendid one to beholdArchibald is a splendid one to beholdArchibald is a splendid one to behold
Default Re: Horizontal Scroller

Quote:
Originally Posted by WayneJohn View Post
I can widen it and tweek here and there. Just what I need.
From your other thread (here), I understand you want it to scroll in the other direction. I attach a version that scrolls towards the right. It's not so suitable for scrolling text but should look good with scrolling of images.

The speed is set within these two lines of JavaScript on the two-iframes page:
Code:
window.scrollBy(-2,0);            //step 2 pixels
t=setTimeout("newsStep()",50);
Above it is set to step 2 pixels every 50 milliseconds. I would keep the time interval somewhere between 25 and 50 milliseconds; any longer and it will start to appear jerky. Actually it does appear a little smoother if you change it to step 1 pixel every 25 milliseconds.
Attached Files
File Type: wpp Horizontal Scroller4.wpp (96.0 KB, 70 views)
__________________
Archibald
Archibald is offline   Reply With Quote
Old 22nd April 2011, 10:24 AM   #20
WayneJohn
Regular Member
 
WayneJohn's Avatar
 
Join Date: Feb 2010
Location: Johannesburg, South Africa
Age: 54
Posts: 153
WayneJohn is on a distinguished road
Default Re: Horizontal Scroller

Thanks Archibald.

Yes, I shall use 1 and 25. Much smoother.

Thanks a lot.

Have a blessed Good Friday and Easter.

Regards.
WayneJohn is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
WebPlus X4: Picture scroller Naz WebPlus 26 16th June 2010 10:12 AM
scroller sonia WebPlus 5 12th June 2010 07:03 AM
WebPlus X4: iframe horizontal scroller mjh WebPlus 26 1st January 2010 11:48 PM
Image Scroller Mo WebPlus 4 12th March 2007 03:24 AM


All times are GMT +1. The time now is 06:22 AM.