Showing posts with label Bug. Show all posts
Showing posts with label Bug. Show all posts

IE Progress Bar Is Loading...

It would never have finished. Most likely it is caused by multiple iFrames within a page. It supposed oK, but IE never have fixed this bug. The problem is where you put some content in an iframe and the content finishes loading in the iframe but the ie status bar keeps loading.

* Create a blank.html file in the root web directory. This file need not contain anything.
* Create an invisible iframe in your page by setting frameborder="0" and style="height: 0; width: 0"
* After the Javascript code that loads the iframe, add the following line:
setTimeout("document.getElementById('ifrDummy').src = 'blank.html'", 100);

No more problems. This solution is provided by Rizal Almashoor. Please note, following solution sometimes does not work:

‹body onload="javascript:fixprogressbar()"›

where fixprogressbar was a javascript function

function fixprogressbar()
{
top.garbageframe.document.write("");
top.garbageframe.close();
return
}


http://www.rizalalmashoor.com/blog/ie-progress-bar-loading-forever-for-iframe/
http://www.pcreview.co.uk/forums/thread-2161806.php

Heredoc and Nowdoc in PHP

Heredoc is to double-quoted string. So the inside can be parsed if there is variable. There is bug associated with Heredoc, namely the line with the closing identifier must contain no other characters, except possibly a semicolon (;). Example:

$err = ‘Parse error, unexpected $end in this.php on line xx’;
<<<HEREDOC
This is to show error message “$err” if you put whitespace either at front or end of closing line.
HEREDOC

Nowdocs are to single-quoted strings however. So a nowdoc is specified similarly to a heredoc, but no parsing is done inside a nowdoc. This is very useful to parse a large block of embedded dynamic codes. Example:

<<<’NOWDOC’
Within this block, though $err is a variable, the final result would be exactly same as what you are seeing now. The variable “$err” won’t be parsed.
NOWDOC

No escape needed for both methods.

In addition, although you can use any word for heredoc and nowdoc purpose, it is recommended using exactly these words to emphasis the difference as well as the help you to remember what these techniques are called.

http://ca2.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc

Labels