Posts Tagged ‘html’

When posting form data to an iframe, be sure to put a NAME on the FRAME!

There was a Chrome update recently that broke a web form of mine.  I had the form posting to an iframe so that I could do a file upload without having to reload the whole page.  I had the id attribute of the iframe populated, but I didn’t previously require a name attribute on it.  After fiddling around with it for a while, I decided “what the heck…” and tossed a name attribute on it.  Voila!

As always, your mileage may vary and what works in one browser today might not work tomorrow.


Page width problems on iPhone Safari – solved!

I was having a bear of a time trying to figure out why a web page was showing up too wide in Safari mobile today.  I thought everything was set up fine:  I had the meta tag to set the viewport to device-width, and the scale to 1.0, etc.  So I figured it was some element within the page that was somehow erupting from the bounds of the body element…but it was in fact the body element itself (and the html element) that needed some attention.  Make sure to set the body and html elements’ width and max-width CSS properties to 100%!  Problem solved.

Weird bug causes Internet Explorer to toss its cookies

Check this out…if you create an <img> tag with an empty src attribute, it might cause Internet Explorer to dump your site’s cookies.  I’ve only tested/experienced this on IE8, so I don’t know all the versions that are affected.  I also don’t know if this happens on all web forms, or just those generated by ASP.Net.

Correction: actually, what’s happening is this:

“Blank src attribute causes IE to load the default document.”  …and in the case of the particular application that I was working on, going back to the default page caused my cookie to get overwritten.

See the comments on

Intellisense fix for Visual Studio 2008 ASP.Net pages

Somehow my settings got jacked up on VS 2008 and Intellisense didn’t work when viewing editing aspx pages in “source” mode (when you’re editing HTML and web form tags).  It coulda been a service pack install, it coulda been some of the paranoid junk that corporate America loads onto work computers nowdays, but regardless of the cause I was hosed.  I tried everything.

I finally found a post that led me to an answer while looking digging through the offical ASP.Net forums.  The proposed fix on the forum didn’t solve my particular issue (the topic was intellisense in XML files), but one poster mentioned switching the editor by right-clicking and selecting “Open with…”.  I remembered seeing that and tried out a couple of different editing modes.  It turns out that the “Web Form Editor” is the one to use.  I set that mother as my default and now I’m plugging away at aspx pages again.

Soooo…in VS 2008’s Solution Explorer, right-click on an aspx page you’d like to edit, then select “Open with…”.  Choose “Web Form Editor” and click the “Set As Default” button.  Done.