Results 1 to 2 of 2

Thread: Scrollable IFRAME and "Wordpress"

  1. #1
    Join Date
    Jan 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Scrollable IFRAME and "Wordpress"

    1) Script Title: Scrollable IFRAME

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...amescroll.htm#

    3) Describe problem:

    Scrollable IFRAME is a very helpful an amazing script BUT How do I enable it to work with "Wordpress content"?

    I have an IFRAME which is calling a wordpress page. I do not want to use the default scroll bars so I want to use the Scrollable IFRAME script, but! the second step of it require to append this to the end of the HTML page loaded into the IFRAME:

    <!--DO NOT REMOVE BELOW SCRIPT. IT SHOULD ALWAYS APPEAR AT THE VERY END OF YOUR CONTENT-->

    <script language="JavaScript1.2">

    //Scrollable content III- By http://www.dynamicdrive.com

    var speed, currentpos=curpos1=0,alt=1,curpos2=-1

    function initialize(){
    if (window.parent.scrollspeed!=0){
    speed=window.parent.scrollspeed
    scrollwindow()
    }
    }

    function scrollwindow(){
    temp=(document.all)? document.body.scrollTop : window.pageYOffset
    alt=(alt==0)? 1 : 0
    if (alt==0)
    curpos1=temp
    else
    curpos2=temp

    window.scrollBy(0,speed)
    }

    setInterval("initialize()",10)

    </script>

    The problem is that Wordpress pages heavily use PHP and CSS so I dunno if it's even possible to append the script somewhere or if there is a different method... or perhaps simply impossible.

    Hope someone can help me.

  2. #2
    Join Date
    Jan 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    It's working!!!

    Thanks to Miroslav Zografski from Adobe Forum who suggested to copy the JavaScript (second step of the scrollable iFrame) code directly into the Theme's footer.php right before the </body>.

    It works like charm... although I haven't test it in IE because I do not have it, but Safari, Firefox, Opera, and Chrome work perfect.

Bookmarks

Posting Permissions

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