Blog - Programming

id = "FBMainForm_1949150" action="/tihomir/blog_programming.html" method = "post" onsubmit = "return false" >
Programming New Entry  

IE crashes related to CSS
by Tihomir Lazarov on 

It's good sometimes to write something in this blog which is not related to this application called IE. I prefer using a browser, not IE. I also prefer writing something about C, Perl, or something else. Actually there's nothing I stumble over so badly like issues with browsers.

Now the daily meal is  - IE6 crashes with a big time crash while loading the fancy popup here in SiteKreator.com.

The header contained 2 blocks - the title on the left and the control buttons on the right. There was a spacer layer in between the control buttons which eased the calculation of the width of the block with different browsers (it wasn't with spacers before, but IE, again, made me do that ugly patch).

So this spacer had a "float: left" CSS attribute and when I removed it, the browser stopped crashing (!?). I found that my calculation was wrong and this CSS attribute triggered the crash. So I fixed the calculations and left the attribute there.

Now it works.

[ ] Comments     Permalink     Add Comment

"Syntax error" in IE7 but there's no syntax error
by Tihomir Lazarov on 

Today I found that if I generate a *big* javascript code between <script> and </script> IE7 gives a "Syntax error" message when the code content is *very big*.

I don't have the exact definition of *big* and *very big*, but I created an HTML using a shell script using 80000 lines of lines like
MY_HASH['21345'].blah = 5;

IE7 gave me "Syntax error" on some line (of course there was no syntax error). If I generate the HTML with like 1000 lines - it's OK.

If I split the 80,000 lines JavaScript code into 80 <script> blocks it works fine too.

[ ] Comments     Permalink     Add Comment

"1 item remaining" in IE
by Tihomir Lazarov on 

Recently I stumbled over a strange bug. Again JS related.

The browser was constantly displaying "1 item remaining".

The reason was related to a flash in the HTML somehow. There was a flash in the HTML which code was output with document.write( ... ). The flash code was in a layer which was moved at the top of the DOM on "onload" event of the <body>. And this triggered the problem.

The fix was simply to output the flash code with <layer>.innerHTML =...;

[ ] Comments     Permalink     Add Comment

Safari - "package" variable not accepted and shows "Parse error"
by Tihomir Lazarov on 

Today was told to do a quick fix for Safari (v1.3.2)

There was some strange error like "Parse error" on some line. I checked the line and it was like:

var package = PACKAGES[ package_id ]

Well, I tried some debugging with the tools Safari offers - no more information than just "Parse error". Very informative.

Finally I started trying renaming my variables and I found a very weird bug: If your variable name is "package" it gives this "informative" "Parse Error".

It's 100% reproducible with the following code:
<script>
var package = true;
</script>


Just change the "package" to "my_package" and it will work.

[ ] Comments     Permalink     Add Comment

 
RSS Feed