SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Evangelist Tapan's Avatar
    Join Date
    May 2005
    Location
    India
    Posts
    564
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    a href tag not working

    Hello,

    I have simple html code but the a href tag in it is not working:

    Code:
    <a href='swfplay.php?ItemID=180'><OBJECT CLASSID='CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000' CODEBASE='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' ID='FVS' Width='300' Height='250'>
    <PARAM NAME='movie' VALUE='items_images/1274439560Movie.swf'>
    <PARAM NAME='bgcolor' VALUE='#000000'>
    <PARAM NAME='allowfullscreen' VALUE='true'>
    <EMBED NAME='FVS' SRC='items_images/1274439560Movie.swf' ALLOWFULLSCREEN='true' BGCOLOR='#000000' WIDTH='300' HEIGHT='250' TYPE='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></EMBED>
    </OBJECT></a>
    What is the issue ?

    Thanks.

  2. #2
    SitePoint Wizard ~ServerPoint~'s Avatar
    Join Date
    Nov 2007
    Posts
    1,813
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You may need to use
    Code:
    <a href="swfplay.php?ItemID=180">
    instead of
    Code:
    <a href='swfplay.php?ItemID=180'>
    ServerPoint.com - a true hosting company since 1998
    Web Hosting, colocation,
    dedicated servers, Virtual Private Server (VPS) hosting

  3. #3
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    It won't work because you are probably writing gibberish code plus "proprietary markup", i.e. EMBED. What exactly are you trying to achieve embed some Flash file within a web-page?

    At the moment you basically have as follows:

    Code:
    <a href="http://www.example.org/">
        <object data="example.png" type="image/png">Generic Fallback</object>
    </a>
    Why are you wrapping the object within a hyperlink in the first place the anchor is inline and usually the "fallback" occurs within the object.

    I'll give you a big hint; where is your "Fallback" text/content? If you had one - like in my example - you might see a hyperlink.

  4. #4
    SitePoint Evangelist Tapan's Avatar
    Join Date
    May 2005
    Location
    India
    Posts
    564
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by xhtmlcoder View Post
    It won't work because you are probably writing gibberish code plus "proprietary markup", i.e. EMBED. What exactly are you trying to achieve embed some Flash file within a web-page?

    At the moment you basically have as follows:

    Code:
    <a href="http://www.example.org/">
        <object data="example.png" type="image/png">Generic Fallback</object>
    </a>
    Why are you wrapping the object within a hyperlink in the first place the anchor is inline and usually the "fallback" occurs within the object.

    I'll give you a big hint; where is your "Fallback" text/content? If you had one - like in my example - you might see a hyperlink.
    Hello,

    Yes i am trying to put in a flash file and thats why there is no fallback text/content. How to go now ?

    Thanks.

  5. #5
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Clicking on a flash object is like clicking in an iframe. The click event goes into the flash object, not to the <object> element, so it never bubbles through to the <a> and so the link is not followed. You need to implement the link in the flash object itself or overlay the link over the flash object.
    Simon Pieters

  6. #6
    SitePoint Addict
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What about the path?

    <a href="../items_images/swfplay.php?ItemID=180">

    Because I saw you used a path in your object:

    VALUE='items_images/1274439560Movie.swf'

  7. #7
    SitePoint Evangelist Tapan's Avatar
    Join Date
    May 2005
    Location
    India
    Posts
    564
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bulevardi View Post
    What about the path?

    <a href="../items_images/swfplay.php?ItemID=180">

    Because I saw you used a path in your object:

    VALUE='items_images/1274439560Movie.swf'
    What about it ? Its just fetching the swf file from that folder nothing special..even if the link exists or not but a href should still work. But it is not working. I think zcorpan is right.

    Thanks.


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
  •