Web Analytics Made Easy -
StatCounter Add link to document.write - CodingForum


No announcement yet.

Add link to document.write

  • Filter
  • Time
  • Show
Clear All
new posts

  • Add link to document.write

    Hi everyone

    I have a problem. I am trying to add html link to flash object using document.write but I am not sure how to do that? Please check my code and make any necessary changes to it. Please help me I am stuck with this for last 2 days now.


    [COLOR="Black"]document.write(<div onMouseUp="window.open('content.htm','_self');">)
    document.write ("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'"); 
    document.write ("codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='76' height='22'>"); 
    document.write ("<param name='movie' value='topic 2.swf'>"); 
    document.write ("<param name='quality' value='high'>"); 
    document.write ("<param name='wmode' value='transparent'>"); 
    document.write ("<embed src='topic 2.swf' width='76' height='22' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' wmode='transparent'>"); 
    document.write ("</embed></object>");[/COLOR]

  • #2
    Try this:-

    document.write("<div onMouseUp=\"window.open('content.htm','_self');\">")

    It is legal to surround a nested string with the same type of quote as is surrounding its containing string as long as the escape character ( \ ) precedes the nested quote. The escape character tells the JavaScript interpreter that the quote is part of the string, not the end of the string.

    All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.


    • #3
      Thanks Philip you are great mate. You solved my problem.