Javascript help needed for "floating" image

Javascript help needed for "floating" image

am 26.09.2007 18:19:18 von Don Wiss

On my StoreFront pages I've added B&H ads. On my longest page
http://donwiss.com/pictures/BrooklynStores/ you can see a single B&H ad at
the top of the right table column. The page is long. I'd like that ad to
remain in view as the people scroll down.

I found a page doing what I want. I looked at the source code. It is beyond
me to understand it. Based on the image size it would appear to be in this
code:







[end of code excerpt]

How would I adapt that to my needs?

Don (e-mail link at home page bottom).

Re: Javascript help needed for "floating" image

am 27.09.2007 15:23:59 von Neredbojias

Well bust mah britches and call me cheeky, on Wed, 26 Sep 2007 16:19:18
GMT Don Wiss scribed:

> On my StoreFront pages I've added B&H ads. On my longest page
> http://donwiss.com/pictures/BrooklynStores/ you can see a single B&H
> ad at the top of the right table column. The page is long. I'd like
> that ad to remain in view as the people scroll down.
>
> I found a page doing what I want. I looked at the source code. It is
> beyond me to understand it. Based on the image size it would appear to
> be in this code:
>
> ..snip
>
> How would I adapt that to my needs?

What you're really talking about is the css styling "position:fixed;"
Javascript can be used to emulate this, particularly in ie6 where the css
designation doesn't work. However, the example you gave is completely
bogus, and using javascript for the purpose isn't a particularly good idea,
anyway, especially if you don't understand how it operates or the
ramifications thereto related.

--
Neredbojias
Half lies are worth twice as much as whole lies.

Re: Javascript help needed for "floating" image

am 30.09.2007 19:52:44 von Don Wiss

On 27 Sep 2007 13:23:59 GMT, Neredbojias wrote:

>Well bust mah britches and call me cheeky, on Wed, 26 Sep 2007 16:19:18
>GMT Don Wiss scribed:
>
>> On my StoreFront pages I've added B&H ads. On my longest page
>> http://donwiss.com/pictures/BrooklynStores/ you can see a single B&H
>> ad at the top of the right table column. The page is long. I'd like
>> that ad to remain in view as the people scroll down.
>>
>> I found a page doing what I want. I looked at the source code. It is
>> beyond me to understand it. Based on the image size it would appear to
>> be in this code:
>>
>> ..snip
>>
>> How would I adapt that to my needs?
>
>What you're really talking about is the css styling "position:fixed;"
>Javascript can be used to emulate this, particularly in ie6 where the css
>designation doesn't work. However, the example you gave is completely
>bogus, and using javascript for the purpose isn't a particularly good idea,
>anyway, especially if you don't understand how it operates or the
>ramifications thereto related.

Demonoid has come back up. Here is an example of what I want to do;
http://www.demonoid.com/files/?category=2&subcategory=0&qual ity=62&seeded=0&external=2&query=&uid=0
However, in Firefox the ad does not appear. In IE7 you can see it working
the way I want. So I guess the code will have to detect the browser and for
Firefox, if it can't remain visible, then to revert back to a single ad at
the top.

All this is beyond me, and if necessary I'll hire someone to do it.

Don (e-mail link at home page bottom).

Re: Javascript help needed for "floating" image

am 01.10.2007 00:30:57 von Neredbojias

Well bust mah britches and call me cheeky, on Sun, 30 Sep 2007 17:52:44
GMT Don Wiss scribed:

>>> On my StoreFront pages I've added B&H ads. On my longest page
>>> http://donwiss.com/pictures/BrooklynStores/ you can see a single B&H
>>> ad at the top of the right table column. The page is long. I'd like
>>> that ad to remain in view as the people scroll down.
>>>
>>> I found a page doing what I want. I looked at the source code. It is
>>> beyond me to understand it. Based on the image size it would appear
>>> to be in this code:
>>>
>>> ..snip
>>>
>>> How would I adapt that to my needs?
>>
>>What you're really talking about is the css styling "position:fixed;"
>>Javascript can be used to emulate this, particularly in ie6 where the
>>css designation doesn't work. However, the example you gave is
>>completely bogus, and using javascript for the purpose isn't a
>>particularly good idea, anyway, especially if you don't understand how
>>it operates or the ramifications thereto related.
>
> Demonoid has come back up. Here is an example of what I want to do;
> http://www.demonoid.com/files/?category=2&subcategory=0&qual ity=62&seed
> ed=0&external=2&query=&uid=0 However, in Firefox the ad does not
> appear. In IE7 you can see it working the way I want. So I guess the
> code will have to detect the browser and for Firefox, if it can't
> remain visible, then to revert back to a single ad at the top.
>
> All this is beyond me, and if necessary I'll hire someone to do it.

I saw no ad on any browser I tried. Of course, I didn't try ie7 because
that's on another computer. However, I believe you.

Anyway, is something like the following what you mean?

http://www.neredbojias.com/zyxix/zpftest.html

This works on everything. (Yeah, right.) Well, it's simple and should
work on "the big three" okay. I didn't bother with "position:fixed;"
because - why bother? If you have to kludge (for ie6), might just as
well use the kludge for everything on condition it's effective.

--
Neredbojias
Half lies are worth twice as much as whole lies.

Re: Javascript help needed for "floating" image

am 01.10.2007 03:14:59 von Don Wiss

On 30 Sep 2007 22:30:57 GMT, Neredbojias wrote:

>Well bust mah britches and call me cheeky, on Sun, 30 Sep 2007 17:52:44
>GMT Don Wiss scribed:
>
>>>> On my StoreFront pages I've added B&H ads. On my longest page
>>>> http://donwiss.com/pictures/BrooklynStores/ you can see a single B&H
>>>> ad at the top of the right table column. The page is long. I'd like
>>>> that ad to remain in view as the people scroll down.
>>>>
>>>> I found a page doing what I want. I looked at the source code. It is
>>>> beyond me to understand it. Based on the image size it would appear
>>>> to be in this code:
>>>>
>>>> ..snip
>>>>
>>>> How would I adapt that to my needs?
>>>
>>>What you're really talking about is the css styling "position:fixed;"
>>>Javascript can be used to emulate this, particularly in ie6 where the
>>>css designation doesn't work. However, the example you gave is
>>>completely bogus, and using javascript for the purpose isn't a
>>>particularly good idea, anyway, especially if you don't understand how
>>>it operates or the ramifications thereto related.
>>
>> Demonoid has come back up. Here is an example of what I want to do;
>> http://www.demonoid.com/files/?category=2&subcategory=0&qual ity=62&seeded=0&external=2&query=&uid=0
> However, in Firefox the ad does not
>> appear. In IE7 you can see it working the way I want. So I guess the
>> code will have to detect the browser and for Firefox, if it can't
>> remain visible, then to revert back to a single ad at the top.
>>
>> All this is beyond me, and if necessary I'll hire someone to do it.
>
>I saw no ad on any browser I tried. Of course, I didn't try ie7 because
>that's on another computer. However, I believe you.
>
>Anyway, is something like the following what you mean?
>
>http://www.neredbojias.com/zyxix/zpftest.html
>
>This works on everything. (Yeah, right.) Well, it's simple and should
>work on "the big three" okay. I didn't bother with "position:fixed;"
>because - why bother? If you have to kludge (for ie6), might just as
>well use the kludge for everything on condition it's effective.

Hi,

It isn't exactly like the demonoid one (I see the site has gone down
again), but yes, it is simple. Instead of the upper right could it be in
the middle along the right? I ask as at the tops and bottom of my pages I
have material going all the way across. That is why the demonois way was so
neat, it stayed within the table column that was between the heading and
footer sections. Having it fixed in the middle would get around this. And,
of course, being greedy, it is most important that the ad appears for all
browsers.

Thanks, Don (e-mail link at home page bottom).

Re: Javascript help needed for "floating" image

am 01.10.2007 21:01:00 von Neredbojias

Well bust mah britches and call me cheeky, on Mon, 01 Oct 2007 01:14:59
GMT Don Wiss scribed:

>>I saw no ad on any browser I tried. Of course, I didn't try ie7
>>because that's on another computer. However, I believe you.
>>
>>Anyway, is something like the following what you mean?
>>
>>http://www.neredbojias.com/zyxix/zpftest.html
>>
>>This works on everything. (Yeah, right.) Well, it's simple and
>>should work on "the big three" okay. I didn't bother with
>>"position:fixed;" because - why bother? If you have to kludge (for
>>ie6), might just as well use the kludge for everything on condition
>>it's effective.
>
> Hi,
>
> It isn't exactly like the demonoid one (I see the site has gone down
> again), but yes, it is simple. Instead of the upper right could it be
> in the middle along the right? I ask as at the tops and bottom of my
> pages I have material going all the way across. That is why the
> demonois way was so neat, it stayed within the table column that was
> between the heading and footer sections. Having it fixed in the middle
> would get around this. And, of course, being greedy, it is most
> important that the ad appears for all browsers.

Sure. which contains the image get it's relative height from
so just change the idiv css "top:??px;" value to "top:50%;". That'll put
the _top_ of the image in the middle. If you want exact middle-to-middle,
you'll have to try negative top margin or something on the idiv or image
itself.

--
Neredbojias
Half lies are worth twice as much as whole lies.