Quick Tip : When Working with jQuery and jqModal

This has stumped me twice, so best thought to make a blog post, for my own records and also for anybody who gets stuck at the same place.

Over the weekend, I have been working with jQuery and specifically jqModal for a full fledged CRUD Grid using ORM. For some of the alerts/forms I was using jqModal to show them. Everything worked fine on Firefox, but IE8 had issues. After an hour or so of searching, I realized that I had faced a similar issue when working with jqModal on IE before.

The problem is that since I do not wirte a lot of HTML in my day to day coding, I generally omit the DOCTYPE sepcification from my pages. This causes interesting issues on IE. So, the solution was to specify the DOCTYPE and everything was working smoothly in IE too. My DOCTYPE specification that solved these issues was:

   view plainprintabout
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

See the difference:
DOCTYPE NOT Present
DOCTYPE Present

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Poul Bak's Gravatar That's because IE goes into Quirskmode when no doctype is
present. Quirksmode is like IE 5.5 !
# Posted By Poul Bak | 10/4/09 10:55 PM
mike's Gravatar I had the same problem and putting the docType tag in fixed the modal problem. However, it changed all of my text on my site to an extremely small font-size. If I remove the line, the font goes back to normal.
# Posted By mike | 10/14/09 1:46 PM
mike's Gravatar OK, bonehead move. Somehow my forms.css line got toasted. Time to go back to servin' tacos.
# Posted By mike | 10/14/09 2:06 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.9.5.003.  Design based on ARCLITE by: digitalnature