Bytor99999
unread,May 21, 2012, 4:48:17 PM5/21/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to fancybox
This happens either by submitting or hitting the cancel X.
I am also using ICanHaz.js templating engine. I basically call iCanHaz
to generate a form for me that I add the html to fancybox. When I
close the fancybox box that form html is now added to the <body> tag
of my document. And keeps adding it after each close of a fancybox.
Basically I have a page with a button. Click the edit button, call
ICanHaz to generate the form. then call fancybox
function showOverlayToEditEvent(data) {
var contents = ich['eventEntry'](data);
$.fancybox( contents, {
maxWidth : 480,
fitToView : true,
autoSize : true,
openEffect : 'fade2',
closeEffect : 'fade'});
}
If I hit the X on fancybox overlay. The form that was in the overlay
is now in the body of my document. Not showing, but in the <body>
I click the edit button the overlay shows again, close it with the X
and now I have that form twice in my <body>
If I keep repeating then I get many more forms added to my body.
I have another form that isn't using ICanHaz that is a static form in
a hidden div. I call fancybox, then click the X and that form also
appears in my body of my document. But it never duplicates. I can open
the form over and over and it only shows up once.
I know ICanHaz doesn't add stuff to the document. Just has a function
that takes JSON and returns a String of html, and I choose where or if
I put it anywhere.
Thanks
Mark