Browsing Posts tagged Internet Explorer


Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /homepages/24/d152177141/htdocs/techblog.tonycollings.com/wp-content/plugins/code-highlighter/geshi.php on line 2147

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /homepages/24/d152177141/htdocs/techblog.tonycollings.com/wp-content/plugins/code-highlighter/geshi.php on line 2147

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /homepages/24/d152177141/htdocs/techblog.tonycollings.com/wp-content/plugins/code-highlighter/geshi.php on line 2147

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /homepages/24/d152177141/htdocs/techblog.tonycollings.com/wp-content/plugins/code-highlighter/geshi.php on line 2147

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /homepages/24/d152177141/htdocs/techblog.tonycollings.com/wp-content/plugins/code-highlighter/geshi.php on line 2147

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /homepages/24/d152177141/htdocs/techblog.tonycollings.com/wp-content/plugins/code-highlighter/geshi.php on line 2147

Huh! This is an interesting dilemma I came across today. Take some fairly standard PHP export script:

  1. span style="color: #ff0000;">"Content-type: application/vnd.ms-excel""Content-Disposition: attachment; filename=some-filename.xls");
  2.  

... set some headers and print($sMyCSVFile);. Well NOT so much with Internet Explorer. Works perfectly with everything else.

Turns out that there is a known issue opening documents over SSL with Internet Explorer. (MSDN Article: 316431) and it's all to-do with caching! If EITHER of the following headers exist then the script will fail:

  1.  

The answer; it turns out, is relatively easy. Simply set :

  1.  

.. Voila! There are also some nice examples of forcing file-download on php.net (http://us3.php.net/manual/en/function.readfile.php)


Further Reading:

OK, this is a good one. Answers in the comments section.

Q: How do you change the visible number of options in a select box when it drops down, not rendered in the DOM, but when it drops down  ?

I've come to the conclusion you can't because of default parameters specified in the Gecko rendering engine. I know that a <select> element has a "size" attribute which you can access through Javascript with {oSelect}.size or use directly in your HTML with something like <select size="25"></select>, but that changes the number of options visible when the DOM is rendered and not on the drop down event.

For once I think IE and the Trident engine has an advantage over FF and Gecko. IE naturally defaults to display the TOTAL number of <option> items on drop down where as FF is limited to 20, then you have to scroll.

I spent some time looking through the MDC reference manuals, for an interface, some sort of API reference, but the HTML Select Element Interface seems to be limited to the usual foray of methods and properties.

I thought maybe with the introduction of Gecko 1.9 (FF3) and Javascript 1.8 that there might be some interface for changing the default, but wading through documentation there appears not.

So my answer to the question, at the moment is no, but I will be making a suggestion to Mozilla !