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.
why make your own when there's already good free ones out there? Javascript and AJAX calendar http://www.meanfreepath.com $20 please.
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.
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
Just thought I'd mention using the following bit of Javascript code solved my problem: location.replace("cal.php?id="+id);