Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Ok, Here's how I fixed it:</p> <p>changing <code><pre> function fillFaceboxFromHref(href, klass) { .... if (href.match(/#/)) { var url = window.location.href.split('#')[0] var target = href.replace(url, '') $.facebox.reveal($(target).clone().show(), klass) .... }</code></pre> to <code><pre> function fillFaceboxFromHref(href, klass) { .... if (href.match(/#/)) { var url = window.location.href.split('#')[0] var target = href.replace(url, '') $.facebox.reveal($(target).show(), klass) .... }</code></pre></p> <p>will stop it cloning the input and instead use the actual div.</p> <p>Then, it's simply a case of re-appending the inner content to the #aspnetform (or #body as it originally used [you have to change that to allow asp.net postbacks]) before it's cleared in the close.facebox binding, like so: <code><pre> $(document).bind('close.facebox', function() { /// two added lines to add the content back to the #aspnetForm, with display:none; (i.e. invisible) $('#facebox .content').children().css({'display' : 'none'}); $('#aspnetForm').append($('#facebox .content').html()); /// extra line to make sure there's no flashing effect as the facebox closes: the content is still in there too! $('#facebox .content').children().css({ 'display': 'block' }); ....</code></pre></p> <p>This will now use the original div as the content, avoiding the comma problem. However, if you wanted to use a div that is visible on the page originally then some extra twiddling would be needed in the close.facebox binding.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload