bdrasin
Newbie
Posts: 1
Registered: 12/18/2006
Location: California
Member Is Offline
|
| posted on 12/18/2006 at 02:09 PM |
|
|
Calendar Display/Day selection trigger onbeforeunload event
Hello,
I'm using the onbeforeunload event to warn the user if they are leaving a page without saving data. The problem I have is that selecting the
calendar ( modal display ), this triggers the onbeforeunload event as if the user was leaving the page (which they are not).
To fix this myself I would need to:
1) Change the calendar to not trigger the onbeforeunload (preferred). This would probably involve replaceing all of the embedded hrefs with onclick()
events
or
2) Get a callback from the caledar every time it displays and is hidden so I can do some extra javascript of my own
Does anyone have a solution for this?
bye-Ben
|
|
|
tigra
Administrator
Posts: 1920
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 12/18/2006 at 04:24 PM |
|
|
Although change seems to be pretty simple to replace hrefs with onclicks, after some investigation this appears to be a serious redesign because the
hrefs when set as property receive the text which is then evaled at the click time while the onclicks receive the function reference. We'll address
this in the next major version of the product but the situation you experience is reported first time in all the years the calendar is on the market
so we will not throw the resources at the implementing first option at this time.
You can intercept calendar open/close by inserting your code inside calendar.js after following fragment:
|
|
|