Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Odd flash display problem w/ Div tags

Reply
Thread Tools

Odd flash display problem w/ Div tags

 
 
Jarry
Guest
Posts: n/a
 
      02-08-2007
I just play around mainly in javascript, and I was making a web page
(http://www.freewebs.com/prugle/games.htm). I have asked a few people
to look at it, and so I have. Some people can see the flash file of
the game (once theychose a game) but others could not. I myself can
see them in Firefox 2.0, but not AOL 9.

The basic javascript is:

<div id="swfarea" class="style2 style5 style8"></div>


//Add games section
name[1] =" Rush"//Can edit
filenames[1] = "Rush 2.swf"//Can edit
heights[1] = 600//Can edit
widths[1] = 600//Can edit

name[2] = "Ghost Chase"//Can edit
filenames[2] = "GhostChase.swf"//Can edit
heights[2] = 559//Can edit
widths[2] = 763//Can edit



--- this is part of a function called wiht a byval of "idno" ---

document.getElementById("swfarea").innerHTML = " <object width=\"" +
widths[idno] + "\" height=\"" + heights[idno] + "\"> <param name=
\"movie\" value=\"" + filenames[idno] + "\" /><embed src=\"" +
filenames[idno] + "\" width=\"" + widths[idno] + "\" height=\""
+heights[idno] + "\" ></embed>"//Do not edit

--- In a different function ---
document.getElementById("swfarea").innerHTML = "<h2 align=\"center\"
class=\"style2 style5\">Introduction</h2> Hello and welcome to the
games section of Foundation Flash. We aim to host new, up and coming
flash games, plus a few old favourites. You can get to games in two
ways: either by using the drop down list at the top, or by presseing
one of the links in the 'Current Games' section below. Please note
that the back browser button may not work on this page, as it is a new
dynamic technology we are using to give you the best performance."//
Can edit


The comments are for a friend of mine who isn't very good at
javascript but would like to help. I hope you can decode the
javascript. I really do not know what will definately solve it, or
whether there is a solution at all

Thanks anyway,

Jarry

 
Reply With Quote
 
 
 
 
RobG
Guest
Posts: n/a
 
      02-10-2007
Jarry wrote:
> I just play around mainly in javascript, and I was making a web page
> (http://www.freewebs.com/prugle/games.htm). I have asked a few people
> to look at it, and so I have. Some people can see the flash file of
> the game (once theychose a game) but others could not. I myself can
> see them in Firefox 2.0, but not AOL 9.


Don't use innerHTML to change content, use DOM methods.


--
Rob
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
<div ... /> and <div ...></div> K Viltersten ASP .Net 4 03-31-2009 07:33 PM
Adding float makes nested div tags go out of parent div. Jimmy HTML 7 11-21-2008 10:44 AM
NS/FF don't change div offsetWidth when div innerHTML is added toand div becomes wider mscir Javascript 3 06-26-2005 04:04 PM
Q: Div A inside Div B is larger than Div B Dwayne Madsen Javascript 1 06-01-2005 03:02 PM
table-tags within div-tags Chris HTML 5 02-10-2004 08:57 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57