Results 1 to 4 of 4

Thread: Javascript to ensure top of the page appears in iFrame

  1. #1
    Join Date
    Sep 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Javascript to ensure top of the page appears in iFrame

    Hello

    I have a webpage with an IFRAME in it and it contains a form where you have to go through 7 steps by answering questions and clicking next. Upon click the page stays where it was left off and doesn't go back to top of the page. Is there javascript code to ensure that top of the page to appear?

    Also, do i have to put the code in the parent page code? or in the link which the IFRAME points to?

    Please help!
    Thanks

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    javascript:window.scrollTo(0,0)

    For example, <body onLoad="window.scrollTo(0,0);">
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Sep 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I will try this. Thanks!!

  4. #4
    Join Date
    Sep 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default any other suggestion?

    Hello
    The code didn't work... Any idea why? It just doesn't bring the page to the top... Please help!

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
  •