Fancybox reload after content changes - fancybox

The problem is that I can't figure out how to resize the fancybox after the content is fully loaded.
Maybe there is a way to add some kind of changelistener to the content div inside the fancybox where you can call some kind of fancybox.resize function.
I've tried some things and had some problems with this before with autocomplete inside a fancybox.
I then used the .live function and binded an event.
This is the code inside the fancybox:
<div id="fancy_chart_div"></div>
So after a chart has been loaded into this div then the fancybox should resize depending on the content.

You can manually call a fancybox resize using the API:
$.fancybox.update()
Call this after your chart is loaded.

Related

Wicket - Add an image to a Modal Dialog

I want to create a popup window that contains an image.
Following an example, I am able to show a label in the ModalDialog using ModalDialog#setContent(). However, I do not know how to show an image taken from an URL. I believe the issue is that I want to add an img tag to a div.
Has anyone got any ideas on how to implement this?
EDIT:
Tested #Tom's suggestion, and I get this error. I have tried changing the div to img but then the modal does not work. As the error message says, Wicket creates
div wicket:id="content" class="modal-dialog-content"
but I want to add an image to the div which it does not like.
Error Message

Textarea is briefly visible before TinyMCE renders

I am using the TinyMCE WYSIWYG editor for a ASP.NET MVC project. Although the editor is working, when the page loads the underlying textarea is visible for a brief moment before the editor kicks in - the raw textarea is visible for about, give or take, a second. Is there a way to only load the content once the TinyMCE editor is ready?
I'm using Bootstrap and if I assign the textarea a class of hide (which essentially is just a display: none CSS style) the textarea is hidden, and the editor renders when it's initialized.
Populate the data on the TinyMCE's init event.
function myCustomOnInit() {
alert("We are ready to rumble!!");
}
tinyMCE.init({
...
oninit : myCustomOnInit
});
code from http://www.tinymce.com/wiki.php/Configuration3x:oninit

How to hide the header in Html before loading conent in UiwebView iOS5 and above?

I have a requirement of Hiding a header or div before displaying the html in UiwebView.I tried the injecting js in webViewdidFinishLoad but it has some problem ie first it load and show the html and then removing the header.
This would be easier to do server side, use javascript to hide the header and then at the bottom of the page have a script that loads to unhide the header.
EGood refrences: javascript hide/show element How can I hide a page contents until all the images are fully loaded?

Disable horizontal scroll bar in GWT-RichTextArea in IE

How can i disable horizontal scroll bar in gwt-richtextarea
I applied overflow-x:hidden and is working fine on firefox but not working on IE
RichTextArea uses an iframe to embed the editable html document.
When you set styles to the rich area, you are setting them to the iframe element, but in your case you have to set styles to the body element of the iframe #document.
The problem here is how to get the content document of the iframe, you have to use jsni, or use a 3party library like gwt-query.
This works with qQuery:
import static com.google.gwt.query.client.GQuery.*;
RichTextArea area = new RichTextArea();
RootPanel.get().add(area);
$(area).contents().find("body").css($$("overflow-x: hidden"));
Another issue is that the creation of the editable document in the iframe is delayed in gwt. So it is safer if you delay the setting of styles, using a Timer.
With gquery you can use the delay() method
$(area).delay(100,
lazy().contents().find("body").css($$("overflow-x: hidden")).done()
);

GXT Window hides behind iFrame in IE

In my GWT application, I have an iFrame embedding a PDF object. The PDF itself is retrieved from a servlet returning it with application/pdf as content type. In Chrome, my Popup, which is a GXT Window, shows in front of the embedded pdf just fine.
In IE however, the popup hides behind the embedded PDF, even if I make its z-index the max value for IE.
I have also tried to call the Window's focus method after loading it, and looked into alternatives for iFrame, but it led to nothing.
How do I make sure the popup Window will show in front of the PDF? What's causing the fact that the PDF brutally forces itself to the front in the current situation?
Internet Explorer has Windowed and Windowless elements - How the Z-index Attribute Works for HTML Elements. Embedded PDF is displayed using plug-in, so it cannot be behind plain DIV.
You should use the technique when an additional IFRAME is put in front of PDF plug-in, but behind the popup. This effectively will make the popup cover displayed PDF. It seems that GXT itself does not provide such a facility (or it does not work properly). You should probably implement your own popup window by extending the one being used. There you would override show() method to create and size additional IFRAME.
A good starting example is the implementation of PopupImplIE6 in GWT.