Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5981683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:58:42+00:00 2026-05-22T21:58:42+00:00

Having a problem embedding a flash chatroom under a doctype equaling strict using the

  • 0

Having a problem embedding a flash chatroom under a doctype equaling strict using the SWFObject

Without the doctype of strict i lose the margin:auto usage under IE. Using the doctype of strict the flash chat room doesnt load properly at all. I read the swfobject embedding techniques for doctype of strict but can not actually get it. This is what i have below, but it squishes the flash together at top instead of expanding it at 100% in height

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Flashchat</title>
<link href="sitecss.asp" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="flash_swf">
<script type="text/javascript">
//<![CDATA[
var so = new SWFObject("swf.swf", "videochat", "100%", "100%", "8", "#FFFFFF");
so.addVariable("rootPath", "http://www.domain.com/flashchat/");
so.addVariable("roomId", "Room");
so.addVariable("app", "chat/videochat.swf");
so.addVariable("uid", "somename");
so.addVariable("skin", "Lead Grey");
so.addParam("wmode", "opaque");
so.write("flash_chat_swf");
// ]]>
</script>
</div>

</body>
</html>

OK, i used javascript to resize the flash on page load

<script type="text/javascript"> 
function resize(){  
var frame = document.getElementById("flash_swf");  
var htmlheight = document.body.parentNode.scrollHeight;  
var windowheight = window.innerHeight;  
if ( htmlheight < windowheight ) { document.body.style.height = windowheight + "px"; frame.style.height = windowheight + "px"; }  
else { document.body.style.height = htmlheight + "px"; frame.style.height = htmlheight + "px"; }  
}
</script>

<body onload="resize()" onresize="resize()">

But, I have a menu on top that’s 40px in height. So I had to set a margin for the DIV margin:40px 0 0 0;. Now the flash is being cutoff 40px too short. How do I set the htmlheight and windowheight within the javascript so its 40 pixels less (-40px) ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T21:58:42+00:00Added an answer on May 22, 2026 at 9:58 pm

    I don’t think that the doc type has anything to do with your issue!
    Are you using the last version of SWFObject (I think that the embed method you’re using is old…) ?

    Anyway, the line

    so.write("flash_chat_swf");
    

    should be replaced by

    so.write("flash_swf"); // corresponds to the div id the flash should be written in
    

    And please insert the java script code outside of the div.

    Instead of manually resizing the window, you should implement this script: http://swffit.millermedeiros.com/ This works very well with swfobject.

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a problem writing Norwegian characters into an XML file using C#. I
I am having problem with Monodevelop 2.4 on windows 7 x64. When using Control-Tab
hi I'm having problem with my database. I'm using access as my database and
I am having problem transforming xml to xml using xsl. I found out where
We're having problem with a huge number of legacy stored procedures at work. Do
I'm having problem in the following line: rd.PrintOptions.PaperSize = PaperSize.PaperFanfoldStdGerman; it throws an exception
Having a problem getting a TreeView control to display node images. The code below
Having a problem trying to create a function, as part of a BizTalk helper
Im having a problem with a final part of my assignment. We get in
We were having a problem with our build server not checking out modifications from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.