Shame the MS IE bad ass once again trying to break down the web developers...
When you using jQuery .apend() function in IE 7 or 8, It will throw a error and break the web page function down.
for example the code below will throw an error and stop to continue execute the rest of the code after this line:
elm.append("<elm2></elm2>");
There is a example can solve this problem which is using XML DOM.
var strXml = "<root>"
+ "<publish>"
+ " <store>"
+ " <book title=\"How to fix IE\"/>"
+ " </store>"
+ "</publish>"
+ "</root>";
// Build XML document
var xDoc = $.parseXML(strXml);
// create new child element using XML Document
var xBook = xDoc.createElement("book");
// setting the attributes of child element using XML DOM method
xBook.setAttribute("title", "How to fix bad ass IE!");
// setting the attributes of child element using jQuery
$(xBook).attr("authr", "Bill ...");
// Append child element to some where in the XML Document
var xStore = $(xDoc).find("store");
xStore.append(xBook);
Monday, May 20, 2013
Sunday, February 17, 2013
How to Take Ownership of a locked folders in Windows 7
takeown /f "C:\Locked Directory" /r /d y
icacls "C:\Locked Directory" /grant administrators:F /t
Tuesday, December 11, 2012
How to make inner float div inside the outer div
When you put some float div inside another div, The outer div will collapse in other words the size of dimension the outer div will small than the inner float div.
The solution is append a div with clear and block style in the end of the other float inner div as below:
<div id="outer_div">
<div class="float-style">Item 1</div>
<div class="float-style">Item 2</div>
<div class="float-style">Item 3</div>
<div style="clear:both;display:block;"></div>
</div>
Solution 2: using overflow:auto; in the outer div style can also prevent outer div collapsed. But this method may cause outer div appear scroll bar when new div adding to it.
<div id="outer_div" style="overflow:auto;">
<div class="float-style">Item 1</div>
<div class="float-style">Item 2</div>
<div class="float-style">Item 3</div>
<div style="clear:both;"></div>
</div>
related link: http://css-tricks.com/all-about-floats/
The solution is append a div with clear and block style in the end of the other float inner div as below:
<div id="outer_div">
<div class="float-style">Item 1</div>
<div class="float-style">Item 2</div>
<div class="float-style">Item 3</div>
<div style="clear:both;display:block;"></div>
</div>
Solution 2: using overflow:auto; in the outer div style can also prevent outer div collapsed. But this method may cause outer div appear scroll bar when new div adding to it.
<div id="outer_div" style="overflow:auto;">
<div class="float-style">Item 1</div>
<div class="float-style">Item 2</div>
<div class="float-style">Item 3</div>
<div style="clear:both;"></div>
</div>
related link: http://css-tricks.com/all-about-floats/
Friday, November 23, 2012
Create log off message for Windows
- Click Start > Run, type “regedit” click Ok button. Registry Editor window will popup.
- Find this path from left side of Registry Editor window: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
- Double click LegalNoticeCaption from right side Registry Editor window. This will popup Edit String window. Type in Value data any name that you want to be your message window title. Click Ok button.
- Double click LegalNoticeText from right side Registry Editor window. This will popup Edit String window. Type in Value data any message, this message will show up on your message window. Click Ok button. Close your Registry Editor window.
- Log off from your computer.
Monday, November 12, 2012
Wednesday, November 7, 2012
How to check which process using TCP/IP Ports in Windows
Run the following command from a command prompt to find the PID of the process which is using TCP port 80 and/or 443.
netstat -aon | find ":80"
netstat -aon | find ":443"
You will see an output similar to the following. Remember the actual PID will vary from case to case.
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 3604
TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 3320
Now using Task Manager you can easily find out to which process the above PID belongs and take appropriate action.
http://support.microsoft.com/kb/973094
Friday, July 13, 2012
Subscribe to:
Posts (Atom)