SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Addict Evan2all's Avatar
    Join Date
    Sep 2004
    Location
    Dhaka, Bangladesh
    Posts
    201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sevaral problems....FLASH & JAVASCRIPT in XHTML

    When we think abt design .swf file and javascript is really handy. But in HTML.. BUT how abt XHTML???

    *I have inserted a rollover button with javascript....and a flash player(swf file) as my animated bannar...Its showing validating error!!!

    here is an example:

    1.javascript: <script language="JavaScript" src="mm_menu.js"> error: xhtml1.0 dosent have language attribute...

    <img name="???" border="1"> dosent have name border attribute in xhtml1.0 strict....

    2.Flash file call: <object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="792" height="100">
    <param name="movie" value="../banner.swf" />
    <param name="quality" value="high" />
    <embed src="../banner.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="792" height="100"></embed>
    </object>
    this embed is not valid in xhtml1.0 strict version...

    Okay now tell me:
    What the helll i should do

  2. #2
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    The first error is that you have <script language=> change it to <script type=>

    The second is that there is no border attribute you will need to control that with some css:
    Code:
    img {border: 1px solid #333;}
    For the 3rd one XHTML does not like the code Flash spits out.

    Try this just change the path and width/height to meet your needs.

    Code:
    <object type="application/x-shockwave-flash" data="movie.swf" width="?" height="?">
        <param name="movie" value="movie.swf" />
     <p>You do not have the flash plug-in installed. If you would like to view the flash portions of this site you will need to <a href="http://www.macromedia.com/shockwave/download/" title="Get Flash!">download the flash plug-in</a>.</p>
        </object>
    Hope it helps

  3. #3
    SitePoint Addict Evan2all's Avatar
    Join Date
    Sep 2004
    Location
    Dhaka, Bangladesh
    Posts
    201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Johnny Gulag
    Hello

    The first error is that you have <script language=> change it to <script type=>

    The second is that there is no border attribute you will need to control that with some css:
    Code:
    img {border: 1px solid #333;}
    For the 3rd one XHTML does not like the code Flash spits out.

    Try this just change the path and width/height to meet your needs.

    Code:
    <object type="application/x-shockwave-flash" data="movie.swf" width="?" height="?">
        <param name="movie" value="movie.swf" />
     <p>You do not have the flash plug-in installed. If you would like to view the flash portions of this site you will need to <a href="http://www.macromedia.com/shockwave/download/" title="Get Flash!">download the flash plug-in</a>.</p>
        </object>
    Hope it helps
    Thanks for solving the flash problem....
    But in Javascript: i am not using css.....here the code:

    <a href="#" onmouseout="MM_swapImgRestore();MM_startTimeout();" onmouseover="MM_swapImage('Image3','','pictures/servicebutton2.jpg',1);MM_showMenu(window.mm_menu_0616144734_0,120,0,null,'Image3')"><img src="pictures/servicebutton1.jpg" name="Image3" width="120" height="15" border="0" id="Image3" /></a>

    these two tag!!! if i remove it the rollover image and table border collapse!!

  4. #4
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    Delete the border attribute from this:
    Code:
    <a href="#" onmouseout="MM_swapImgRestore();MM_startTimeout();" onmouseover="MM_swapImage('Image3','','pictures/servicebutton2.jpg',1);MM_showMenu(window.mm_menu_0616144734_0,120,0,null,'Ima ge3')"><img src="pictures/servicebutton1.jpg" name="Image3" width="120" height="15" border="0" id="Image3" /></a>
    Then in the <head> section of the page add this:

    Code:
    <style type="text/css" media="screen">
       img {border: 1px solid #333;}
       </style>
    Of course you can change the color and width to whatever you want. That will control the border for all images.

    If you only want to control a single image from that selector than you could use the id of the particular image you wanted to style in this case it is Image3:
    Code:
    img#Image3 {border: 1px solid #333;}
    Than that will only control the image with an ID of Image3.

    Hope it makes sense, if not ask again and I will try my best to make sense of it

  5. #5
    SitePoint Addict Evan2all's Avatar
    Join Date
    Sep 2004
    Location
    Dhaka, Bangladesh
    Posts
    201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    maaannnnnn it works......it worksssss!!!!!!
    BUT DO U KNOW ONE THING??? XHTML(......censored)!!!!!

  6. #6
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Whether you use HTML or XHTML will not affect either of these issues.

    <embed> is not allowed in either HTML or XHTML. The language attribute of <script> is not allowed in either HTML 'Strict' or XHTML 'Strict'.

    This is not a problem with XHTML - it is simply an invalid code problem.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  7. #7
    SitePoint Enthusiast t2india's Avatar
    Join Date
    Aug 2003
    Location
    India
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If we remove embed tag then .swf will not show at all in Netscape and FireFox. So is it possible to have valid cross browser w3c HTML file having flash object?
    Travelling to India visit t2india.com
    All India travel

  8. #8
    SitePoint Enthusiast t2india's Avatar
    Join Date
    Aug 2003
    Location
    India
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Found good explanation about how to use Flash object having valid MarlUp language and cross browser support here http://www.alistapart.com/articles/flashsatay/
    Travelling to India visit t2india.com
    All India travel


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •