...

View Full Version : make IFRAME floating on screen?



V@no.
04-02-2003, 03:18 PM
Hi!
I saw so many scripts that let an image floating on screen when u scroll the page, but is there a way to do same with <IFRAME>?
thx.

Quiet Storm
04-02-2003, 04:29 PM
Could do it with a DIV, but I've never seen a 'floating' IFRAME...

Might be possible... :)

Vladdy
04-02-2003, 04:33 PM
Like this (http://www.codingforums.com/showthread.php?s=&threadid=17228) ?

V@no.
04-02-2003, 04:44 PM
Originally posted by Vladdy
Like this (http://www.codingforums.com/showthread.php?s=&threadid=17228) ?
yay! getting close!
can it be done to make the iframe appier on sertain fixed position, and when page scrolled, it moves back to that possition?

Vladdy
04-02-2003, 04:53 PM
Easy. Initial positioning is done in the creation function (see code). The returned object is the "window" div element. Trap body's resizing and scroling events to set the style top and left.

V@no.
04-02-2003, 04:59 PM
Originally posted by Vladdy
Easy. Initial positioning is done in the creation function (see code). The returned object is the "window" div element. Trap body's resizing and scroling events to set the style top and left.
sorry, I'm really newb in JS...:o right now my experience in JS is limited with copy/paste...well, maybe little more, but, here (http://come.no-ip.com/?menuside=2) is what I have (move cursor to the left).
and it "prints" through javascript itself.

Vladdy
04-02-2003, 05:39 PM
You do not need iframe for this slide-out section. If anything, putting it in iframe will make things worth.

V@no.
04-02-2003, 05:56 PM
Originally posted by Vladdy
You do not need iframe for this slide-out section. If anything, putting it in iframe will make things worth.
what do u mean I dont need iframe for that?
how else I can make that slide-out section with html part in it?
I found lots of scripts that just displays menu links, but I need have html in it...

Vladdy
04-02-2003, 06:01 PM
absolutely positioned div element with z-index higher than everything else

V@no.
04-02-2003, 07:16 PM
well, ok, but to do so, javascript must "print" the contest of the <DIV> right?
I can not just create anywhere in the page <div id="blah">here is my code</div>
and then make javascript move it around...can I?
so far I could achive it only when I use something like:
document.write="<div id='blah'>dassadfasdfsadf
javascript code
document.write="</div>"
hope I'm wrong in this!

Vladdy
04-02-2003, 07:41 PM
No, you do not need javascript to "print" it. Create it as a part of the page and position it outside the visible area (left: -250 px) then use javascript to change the left property to create the sliding effect

V@no.
04-02-2003, 09:33 PM
alright! thank you very much!
with <div> I save about 10kb per page and about .05 sec for compiling page with php!
and it's actual alot.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum