Archive for May, 2005

Scrolling in Internet explorer causes elements to lose focus

Today I spent a few hours trying to debug a web app which uses an autosuggest similar to Google Suggest. I also had an “onBlur” on the text box that will hide the suggestions. Unlike Google Suggest, I could not limit the number of suggestions because it was suggesting names of people in the database and I can’t just list the first 10 or 15 “Johnson” names, I have to list them all. That “Johnson” list can get long enough to overflow off the page, causing a need to scroll down to see all results listed.

Although this wasn’t a problem in Firefox, Internet Explorer was causing the text box to lose focus and therefore hide suggestions whenever I clicked the scroll bar in order to view lower results. I tried Google’s page and shrunk my window enough that a scroll bar appeared, but Google’s suggestions weren’t dissapearing! What in the world is going on here? After searching through my code for something I might be doing that would cause it, I finally started just simply deleting elements from my page until it worked. It wasn’t until I deleted the Doc Type Declaration at the top of the page that it started working. I checked Google Suggest’s code, and sure enough, there is no DTD on that page.

Bookmark and Share

2 Responses  |  add yours »

Clean Up Word HTML with Dreamweaver

I recently received a rather lengthy and somewhat elaborate MS Word document, which I was asked to convert to HTML for uploading to a 3rd party’s website. My first instinct was to save the Word document as HTML and use Dreamweaver’s "Clean Up Word HTML" Command. But not only did I have to leave it running all night for Dreamweaver to finish "cleaning", but the results were far from desirable in my opinion. There were still a lot of left over inline styles, etc. that Dreamweaver just plain missed.

I approached it differently this morning and just selected the entire document in Word, copied it, and then pasted it into Dreamweaver’s Design window. Not only was it much, much faster, but the output code was much, much cleaner! I didn’t have to run the "Clean Up Word HTML" Command afterwords either.

Moral of the story: If you get an HTML document that was created using Word: yes, clean it up. But if you get a Word Document and need to convert it to HTML, don’t waste your time converting it to HTML with Word and cleaning it up, just copy and paste it!

Bookmark and Share

1 Response  |  add yours »

Search