iframe question

Discussion in 'HTML & Website Design' started by tandac, Dec 4, 2006.

  1. #1
    I am messing around with a simple web calendar. To make it easy to include on each page and to make scrolling around the calendar easy I have chosen to use an iframe.

    An example can be seen here:
    http://www.tandac.com/cal

    While it all works great, there is a small bug I'm hoping to resolve:
    Browsing around the calendar means those clicks get appended to the history button. That means hitting my browser's back button brings back the previous change in the calendar rather than the previous HTML page before the calendar page.

    Another description of the problem can be seen here:
    http://weblogs.asp.net/dbarrow/archive/2003/06/19/8953.aspx

    Their solution uses a second domain. I would rather do something involving Javascript.

    Any suggestions would be apreciated.
     
    tandac, Dec 4, 2006 IP
  2. tandac

    tandac Active Member

    Messages:
    337
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #2
    $20US payable via paypal to the first person who finds me a solution
     
    tandac, Dec 5, 2006 IP
  3. smallbuzz

    smallbuzz Peon

    Messages:
    125
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    why make your own when there's already good free ones out there?
    Javascript and AJAX calendar
    http://www.meanfreepath.com

    $20 please.
     
    smallbuzz, Dec 5, 2006 IP
  4. smallbuzz

    smallbuzz Peon

    Messages:
    125
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Here's a solution:
    Set onClick events on the calendar to move the focus back to the parent frame each time someone chooses a date or clicks << >>. That way, the back button will affect the parent page rather than the iframe calendar, its what the back button should do anyway.
     
    smallbuzz, Dec 5, 2006 IP
  5. tandac

    tandac Active Member

    Messages:
    337
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #5
    Money will only be awarded to a demonstrated working solution
     
    tandac, Dec 5, 2006 IP
  6. rspadi

    rspadi Guest

    Messages:
    60
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #6
    There are tons of free code sample. Just type in something like "free calender script" into Google.

    If you want your site to be optimized for the search engines, you shouldn't use iframes.

    Robert
     
    rspadi, Dec 5, 2006 IP
  7. tandac

    tandac Active Member

    Messages:
    337
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #7
    Just thought I'd mention using the following bit of Javascript code solved my problem:

    location.replace("cal.php?id="+id);
     
    tandac, Dec 26, 2006 IP