Custom Scrollbar Javascript

On 5 Dec. 2007, 4:58 pm, lfedje wrote:

The question is, how do you prevent the container height from changing or making it so that it remains empty (no value).

That is always the question with Freeway. Because Freeway generates the code at the time of publishing, “editing” the html is not an option. Actually, keeping the size field empty is a simple matter of deleting the size then “tabbing” out of the field. The tabbing is the critical step here.

Any standards compliant browser will display the max-height styling correctly. IE is not one of them. So the question is, as you rightly surmise, where to put the styling code in Freeway so that IE won’t choke? It is definitely not straight forward.


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 5 Dec. 2007, 4:58 pm, lfedje wrote:

I changed the style for content to height:288px.

I then removed height:288px from the container div. (this was done simply by editing the html and uploading the new html file).

I checked your page link. This does not work in Safari of Firefox on the Mac. This turns off the scrolling basically.


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yes, I just saw that.

Honestly I had it working using the hard coded method, but then I went in and changed a few things. I then tested it in IE and all was ok, but forgot to check out FF and Safari.

Back to the drawing board.

Back to you later. BTW, I was able to get the height out of the container div.

Loren


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I mentioned this before but why not use a conditional statement (stylesheet) that targets the specific IE version? You can define the CSS for your div however you need to for those browsers.

Todd

On Dec 5, 2007, at 2:45 PM, chuckamuck wrote:

Any standards compliant browser will display the max-height styling correctly. IE is not one of them. So the question is, as you rightly surmise, where to put the styling code in Freeway so that IE won’t choke? It is definitely not straight forward.

Ok, try it again.

I removed the style and manually put in the height:288px.

What we really want is to maintain the height for the container at 288px, but when you resize the content the container increases to the same height.

Loren


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 5 Dec. 2007, 8:12 pm, Todd wrote:

I mentioned this before but why not use a conditional statement
(stylesheet) that targets the specific IE version? You can define the
CSS for your div however you need to for those browsers.

Yes, yes you did. :slight_smile:

Wouldn’t happen to know where I can find a good example would you?


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

As a matter of fact I do.

First, in FW terms:

  1. Go to menu > Page > HTML Markup…

  2. Select Before and insert…

Now create your stylesheet and add the necessary CSS to fix whatever problem you’re having.

For example:

#mydiv {
width:200px;
border:.2em
}

I use Coda or CSSEdit (or a text editor) for this but you could use FW to create the stylesheet though I find the process clunky. I then manually place the CSS file in the CSS folder (on the server) that FW creates though you can place it anywhere. Be sure to change the above reference to match the actual location if it’s somewhere other than the CSS folder.

The above example targets only IE6 but depending on what IE browsers are acting up you could get them all in one shot if need be. More here<http://www.javascriptkit.com/howto/cc2.shtml>

Any questions give a shout.

Todd

On Dec 5, 2007, at 4:06 PM, chuckamuck wrote:

Yes, yes you did. :slight_smile:

Wouldn’t happen to know where I can find a good example would you?

So nobody can post a FW example file with this working?


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 11 Dec. 2007, 8:18 pm, dhrose wrote:

So nobody can post a FW example file with this working?

See the link at the end of the tutorial.


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hmmm… I can’t see anything different in this file than the one I created other than maybe the javascript file I have is not the same? But hey, it works… One question, the scroller seems to get longer if I extend the scroll container? Is there any way to maintain the size of the scroller while changing the scroll area?

Thanks again!


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I just realized the javascript has to be in the “site” folder… which I had no idea (where it was) since I copy whole sites and redo with different logos and such for demo purposes! Hmmm… what’s the best way to duplicate a site and maintain the links and resources as well as the site location… if you want to use one to build another? …and that scroller button? Any way to make it stay the same size??? Thanks again.


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 12 Dec. 2007, 2:02 pm, dhrose wrote:

Hmmm… I can’t see anything different in this file than the one I created other than maybe the javascript file I have is not the same?

Different javascript file? Ok…

But hey, it works… One question, the scroller seems to get longer if I extend the scroll container? Is there any way to maintain the size of the scroller while changing the scroll area?

Thanks again!

No. The length of the scroller is totally automatic and is determined by the javascript according to the length of the content div. More content, shorter scroller; less content, longer scroller. However, the width of the scroller is totally up to you.


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hmmm… doesn’t the “container” style affect the scroller as well as the content? I noticed if I create a second “container” style for the scroller, it will change the scroll button, but then the dom.javascript needs to be changed… right?


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 13 Dec. 2007, 1:46 pm, dhrose wrote:

Hmmm… doesn’t the “container” style affect the scroller as well as the content? I noticed if I create a second “container” style for the scroller, it will change the scroll button, but then the dom.javascript needs to be changed… right?

No, the “content” size is what determines the scroller size. The “container” style only sets the vertical size of the container that the “content” is displayed in.

It may seem otherwise, but the fluctuating size of the scroller bar is how scroll bars work normally.


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

So is there any way to change the scroller/scroll independently of the actual text area? Has to be some way to change the code… Geez, I’m no java expert, but I see this all the time?


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Interesting development related to using this tutorial with Freeway PRO 5. Currently in version 4.x you can input a specific height in the settings palette, but Freeway will not accept it when the content is larger than the height indicated. This has been fixed in Freeway 5. What that means is that the height now works correctly in IE.

Basically the tutorial advises creating a style with the CSS max-height value added through the Extended menu option. This is no longer necessary with Freeway 5. You can simply put in a height value and Freeway 5 will now accept that regardless of content.

Once Freeway 5 ships I will update the tutorial to reflect the change.


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

As I promised, I have updated the tutorial to reflect changes in use with FW5. Actually less work now…which is a good thing! :slight_smile:


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Is there a way that you can position the scroller halfway down to start at a specific area in the content text?

As my client would like a calendar page that I created to begin on the month of the year in the scroll area?

So if it is June the the scroller would start half way down
(but it still needs to scroll all the way up and down)

I hope this makes sense??


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Is there a way that you can position the scroller halfway down to start at a specific area in the content text?

The script does not have that ability. But it sounds like you should be able to do what you want with anchors. If I understand you correctly your calendar is all in one html box. I would suggest making a list of month names as a menu that are linked to anchors for the month in needing to be viewed.

Or do I not understand correctly?


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thats okay you did understand me correctly and I’ll try with the anchors. Thanks for the quick reply.


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options