Custom Lightbox IE Error

I’m trying to use a custom lightbox and keep getting an error. Seems to only be happening in IE.

Custom Lightbox Partial

[code]
@using(Html.BeginForm(“Save”,“Scheduler”))
{
@Html.TextBoxEntryFor(c => c.id)
@Html.TextBoxEntryFor(c => c.text)
@Html.TextBoxEntryFor(c => c.start_date)
@Html.TextBoxEntryFor(c => c.end_date)

        <input type="submit" name="actionButton" value="Save" />
        <input type="submit" value="Close" />
        <input type="submit" name="actionButton" value="Delete" />

}[/code]

Controller

[code]
public ActionResult Temp()
{
var scheduler = new DHXScheduler(this); //initializes dhtmlxScheduler
scheduler.LoadData = true;// allows loading data
scheduler.EnableDataprocessor = true;// enables DataProcessor in order to enable implementation CRUD operations
var box = scheduler.Lightbox.SetExternalLightbox(“Admin/Scheduler/CustomLightBox”, 600, 500);
scheduler.BeforeInit.Add(“init()”);

   return View(scheduler);

}

[HttpPost]
public ActionResult CustomLightBox(CalendarEvent calEvent)
{
return PartialView(“CustomLightBox”, calEvent);
}[/code]

The error seems to be coming in the dhtmlxscheduler_custom_lightbox.js on the innerHTML.

form += '</form>'; if (!frame.Document) var frameBody = frame.contentDocument.body; else var frameBody = frame.Document.body; frameBody.innerHTML = form;

Thanks for any help, I can give more info if needed.

Hello,
1)do you get the same error with the related sample from the package?
2)could you post error message, please?

Hi,

  1. Yes, I get Line: 66 Error: Unknown runtime error. I’m pretty sure it has to do with invalid html. It looks like it trys to put the form inside the html head tag and then repeats the contents of the form, exlcuding the form itself and hidden elements in the body tag. I have attached an image of both. I’m using IE 8.
  2. Above is the error message…not much detail.

This is what framebody.innerHTML looks like when my project breaks. Notice abandoned form tag at the end.

<DIV class=data-entry><LABEL for=text>text:</LABEL><INPUT id=text value="New event" name=text></DIV>
<DIV class=data-entry><LABEL for=start_date>start_date:</LABEL><INPUT id=start_date value="08/07/2012 02:30" name=start_date></DIV>
<DIV class=data-entry><LABEL for=end_date>end_date:</LABEL><INPUT id=end_date value="08/07/2012 02:35" name=end_date></DIV><LABEL>Partial View</LABEL> <INPUT value=Save type=submit name=actionButton> <INPUT value=Close type=submit> <INPUT value=Delete type=submit name=actionButton> </FORM>

Thanks.




Thank you for the details, we will try to reproduce the issue now
I’ll let you know when we find something out

Any update on this? Unobtrusive validation doesn’t appear to work as well. It most have trouble with the form being in the head and the fields being duplicated in the head and body.

Thanks for the help.

-Chris


Hello,
sorry for taking so long with reply.
The bug is confirmed, we’ll release a fix today,
I’ll notify you when it will be ready

Hi,
please, try the attached sample,
does the issue happens there?
The validation rule is following
[Required]
[StringLength(15)]
public string text { get; set; }
jqueryValidation.zip (738 KB)

Thanks for the reply. This doesn’t appear to work in IE 8 or in compatibility view. It keeps calling the LightboxControl action over and over. I tried in firefox and chrome and it appears to work. Sorry if you felt rushed, just wanted to make sure this worked before purchasing the control. Everything else seems great. Thanks.




Try the updated sample, the bug should be fixed now
jqueryValidation_latest.zip (732 KB)

Works great. Thanks.