search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

iFrame weirdness with ie7

Asked by Dave Abad
17 years ago.
Hey there,

I'm embedding the daypilot control in an iframe and I'm using Javascript handling. eventClick and TimeRangeSelected are working fine but eventMove and eventResize are acting odd. eventMove does not work at all and only the event end can be adjusted for eventResize. The cursor never changes to the adjust height style when you roll over the event start.

All events work fine with Firefox and even with IE7 if I open up the iFrame directly with the browser.

Dave
Comment posted by Dan Letecky
17 years ago.
I've tested DayPilot Pro inside an iframe and it was working fine (FF2, IE6, IE7). Can you please send your sample to daypilot @ annpoint.com so I can test it?
Comment posted by Dave Abad
17 years ago.
That's great to hear. Must be something conflicty on my end that I'm doing. Let me look at the code again and if it's still being a bother I'll shoot you the code.

Dave
Comment posted by Dave Abad
17 years ago.
Hey again. I simplified the code as much as possible and the behavior is repeatable in my environment. Here's what I've got....

<pre>
<html>
<body>
<iframe name='weekview' src ='./daypilot/weekview_test.aspx?uid=17' width='560' height='600' frameborder='0' style='padding: 10px; margin-top: 5px;'>
</iframe>
</body>
</html>
</pre>


And here's the code for weekview.aspx...

<pre>
<%@ Page Language="VB" debug="true" Title="DayPilot" Culture="en-US" %>
<%@ Register Assembly="DayPilot" Namespace="DayPilot.Web.Ui" TagPrefix="DayPilot" %>
<%@ Import Namespace="System.Data" %>

<script runat="Server">

Sub Page_Load(sender As [Object], e As EventArgs)
BindData()
End Sub 'Page_Load

Sub BindData()
Dim dt as new DataTable()
dt.Columns.Add("event_start", GetType(DateTime))
dt.Columns.Add("event_end", GetType(DateTime))
dt.Columns.Add("header", GetType(string))
dt.Columns.Add("eventid", GetType(string))

Dim dr as DataRow
dr = dt.NewRow()
dr("eventid") = "0"
dr("event_start") = Convert.ToDateTime("15:30").AddDays(1)
dr("event_end") = Convert.ToDateTime("16:30").AddDays(1)
dr("header") = "Test Event"
dt.Rows.Add(dr)

DayPilotCalendar1.DataSource = dt
DayPilotCalendar1.DataBind()
End Sub
</script>

<html>
<body id="body" runat="server">
<form id="form1" runat="server">
<daypilot:daypilotcalendar id='DayPilotCalendar1' runat='server' Days='7' CellsPerHour='4' CellHeight='4'
DataEndField='event_end' DataStartField='event_start' DataTextField='header' DataValueField='eventid'
eventResizeHandling = 'JavaScript' TimeRangeSelectedHandling='JavaScript' eventClickHandling = 'JavaScript' eventMoveHandling = 'Javascript'> </daypilot:daypilotcalendar>
</form>

</body>
</html>
</pre>


The only thing non-standard here is that the iFrame is .net and it's embedded within a trad asp page but that shouldn't matter. Also I hand coded the .net page. Didn't use visual studio since it's just a couple lines of code.

Here's the issue on the two test environments I've tried with the latest version of the pro eval....

On Firefox on the Mac everything works great. I can drag the appointment. Resize by top or bottom handle. Etc.

On IE7 on the PC the drag cursor doesn't appear so the appointment cannot be dragged and only the bottom resize handle works.

Like the pirate that walked into the bar with a ship's wheel sticking out of his pants said to the bar tender.... it's driving me nutz!

Any help would be greatly appreciated.


Regards,


Dave
Comment posted by Dan Letecky
17 years ago.
Hi Dave. Try removing the style attribute from iframe declaration:

style='padding: 10px; margin-top: 5px;'

The iframe padding/margin breaks the mouse offset JavaScript calculations. I will try to fix it in the next release.
Comment posted by Dave
17 years ago.

Dan

Sweet. That got it.

Thanks!

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.