Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    Regular Coder
    Join Date
    Feb 2003
    Posts
    101
    Thanks
    0
    Thanked 0 Times in 0 Posts

    make IFRAME floating on screen?

    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.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Beyond Lament
    Posts
    424
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Could do it with a DIV, but I've never seen a 'floating' IFRAME...

    Might be possible...
    Quíet Storm Designs ~ Art is not what you see, but what you make others see.
    · the Storms· || ·Ultraviolent Winter· || ·Was Einstein Wrong?· || ·It´s About Time!·

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Like this ?
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #4
    Regular Coder
    Join Date
    Feb 2003
    Posts
    101
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Vladdy
    Like this ?
    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?

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #6
    Regular Coder
    Join Date
    Feb 2003
    Posts
    101
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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... right now my experience in JS is limited with copy/paste...well, maybe little more, but, here is what I have (move cursor to the left).
    and it "prints" through javascript itself.

  • #7
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You do not need iframe for this slide-out section. If anything, putting it in iframe will make things worth.
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #8
    Regular Coder
    Join Date
    Feb 2003
    Posts
    101
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...

  • #9
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    absolutely positioned div element with z-index higher than everything else
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #10
    Regular Coder
    Join Date
    Feb 2003
    Posts
    101
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!

  • #11
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #12
    Regular Coder
    Join Date
    Feb 2003
    Posts
    101
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •