PDA

View Full Version : extJS4.0 in Secured aspx pages



Jayaram
9 Dec 2011, 1:51 AM
Hi All,
I'm using extJs.4.0 in my web application. I have an image arrow in the grid column header to show a context menu and even in the context menu to drill down for more options.
My web page is secured (https://SamplePage.aspx) but the image dowloand from Sencha has an un-secured URL (http://www.sencha.com/s.gif) because of this my page wll generate a warning on-Click of it.
How can I convert it to (https://www.sencha.com/s.gif)?

Problem wiht IE 7, working fine in IE8

skirtle
9 Dec 2011, 2:03 AM
That image is the 1 pixel transparent gif. It is provided using the inline data protocol for browsers that support it but for older versions of IE it must be served up through http.

You should not be using the default location on sencha.com, not for http or https. You need to set Ext.BLANK_IMAGE_URL to a suitable https value on your own server.

http://docs.sencha.com/ext-js/4-0/#!/api/Ext-property-BLANK_IMAGE_URL

Jayaram
14 Dec 2011, 12:26 AM
Thanks for the response,
Yes, the Base64 encode won't support in IE7.

I already have the code to replace the image.Still it's getting the image from http://www.sencha.com/s.gif.

Code snippets:
HtmlGenericControl extBlankImageScript = new HtmlGenericControl("script");
extBlankImageScript.Attributes.Add("language", "javascript");
extBlankImageScript.InnerHtml = "Ext.onReady(function() {Ext.BLANK_IMAGE_URL = '" + SessionManager.URLRoot + "/ApplicationScripts/ExtJS3/resources/images/default/s.gif';$get('ECIN_Pagelet_Content').style.padding = '0px';});";
Page.Header.Controls.AddAt(++scriptHeaderIndex, extBlankImageScript);

Also I tried the below code after your response. But no luck:
Ext.onReady(function() {
Ext.BLANK_IMAGE_URL = ("../../resources/images/default/s.gif");
}

How I can set Ext.BLANK_IMAGE_URL globally?

nfuids
14 Dec 2011, 6:51 AM
Try setting it in your application launch's function or above that.