all posts

Update Am I a bad person for doing this?

Published to Blog on 22 Jan 2005

RE: Am I a bad person for doing this?

Apparently I am. While everything worked fine using Firefox it didn’t work at all in IE.  I was a little bit floored to say the least.  Usually IE is much more forgiving.

Passing the content to be displayed in the iframe’s page through the query string didn’t work for IE - I don’t know if it was an issue with the content being to long or not.  It just wouldn’t display the iframe in IE, which I thought was weird.

So I ended up just dynamically writing out he string for the iframe to the literal, writing out the JavaScript that added the content to a JavaScript variable on the parent page.  One the iframe’s page I added an onload event to call a JavaScript function that gathered the variable containing the content from the parent page and then added via innerHTML to a div on the page. 

It worked out well and is apparently the “right” way to do it.  Guess I should have just done it right the first time instead of looking for a shortcut, huh? You live and learn.

Dan Hounshell
Web geek, nerd, amateur maker. Likes: apis, node, motorcycles, sports, chickens, watches, food, Nashville, Savannah, Cincinnati and family.
Dan Hounshell on Twitter