Skip to main content

Posts

Showing posts from 2010

Close Parent window from nested iframe child pages : javascript;

for : IE and FireFox 1: <script language="javascript" type="text/javascript"> 2: function CloseAll() { 3: if (top === self) { 4: alert('not iframed'); 5: if (navigator.appName == "Microsoft Internet Explorer") { 6: self.close(); 7: } 8: else { 9: var respnseVal = confirm("Do you wan't to close this window"); 10: if (respnseVal) { 11: netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite"); 12: window.open('', '_self'); 13: window.close(); 14: } 15: } 16: } 17: else { 18: alert('iframed'); 19: if (navigator.appName == "Microsoft Internet Explorer") { 20: top.close(); 21: } 22: else { 23: var respnseVal = confirm("Do you w

FckEditor panels hide behind the Model Popup

Using FckEditor with asp.net model popup, there a possibility of Property windows hide behind the model popup panel change the configuration value to higher value than existing fckconfig.js and find this line: FCKConfig.FloatingPanelsZIndex = 100005 ; // 100005 value can be changed according to the browser : These z-index values can be checked using Element inspection facility of Firebug or IE developer Tool Bar, by applying appropriate values for respective panels (using styles) is another workaround

C# Windows, Iterate through Menu Items (MenuStrip)

for (int i = 0; i < this.menuStrip1.Items.Count; i++) { //main menus items string mnuItemName = this.menuStrip1.Items[i].Name; ToolStripMenuItem tmpMenuItem = this.menuStrip1.Items[i] as ToolStripMenuItem; //check for sub menu for (int j = 0; j < tmpMenuItem.DropDownItems.Count; j++) { string menuSubItem = tmpMenuItem.DropDownItems[j].Name; } }