SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Oct 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How we can upload .doc and .swf file display in browser

    Hello Friends,

    How are you i hope you are all fine there, dear friends i want to need help how i can make a link of button to show the file .doc or .swf in browser where is my other file appear like my photo gallery etc.


    Thanks


    Bye with love and best wishes,

    R.R.Hussain

  2. #2
    The Mind's I ® silver trophy Dark Tranquility's Avatar
    Join Date
    Sep 2003
    Location
    KSA - UAE
    Posts
    9,457
    Mentioned
    8 Post(s)
    Tagged
    1 Thread(s)
    Well for the SWF it is easy just be sure that your browser has the latest version of Adobe Flash player and you will be able to display an .swf in your browser. This been said you should normally include your .swf in a HTML page and give it the right size and it will display correctly.

    As for the doc you may try to install a Word Viewer plugin:
    http://www.microsoft.com/downloads/d...DisplayLang=en

    and if you are going to do this for a website may be you should alert your visitors...
    Once you have your plugin installed, may be for the docs you can use something like this:

    The main page: index.html:
    Code HTML4Strict:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Word Documents Show case</title>
    </head>
     
    <body>
     
    <div>
     
    <a href="your_document.doc" target="word_window">Word Document </a><br />
     
    </div>
    <div>
    <iframe name="word_window" width="750" height="750" src="blank.html"></iframe></div>
     
    </body>
    </html>

    blank.html page:

    Code HTML4Strict:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>blank place holder</title>
    </head>
     
    <body>
    <p>Word doc will load here.</p>
    </body>
    </html>

    it uses iframes that might be appropriate for this case!

  3. #3
    SitePoint Member
    Join Date
    Oct 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dear Sir,

    I want to upload from database and when we click my desire link then they dislplay on page please see my site if you have personal email ID where i can send ok. forum is not accepted the URL link ok



    and check the link under the CCTV ok here i want to display the swf file or doc file when i click on the button ok i hope now you can better understand my question.

    Thanks,

    Bye with love and best wishes,

    R.R.Hussain

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,869
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    You need to be really careful about placing doc files on the web as often there is information in the files that has supposedly been deleted that is readable to those that know how. I have heard of courts getting into trouble over privacy when their published transcripts of court cases contained other readable info that wasn't allowed to be published, a report on how smoking isn't so harmful that was supposedly an independent study which contained "deleted" material that originated at a cigarette company, and people's resumes where the potential employer has extracted a list of all the other places the person has applied to.

    Also doc files can't be displayed in the browser without a plugin and most people will not install that plugin.

    The best alternative is to convert it from doc to pdf. It will still require a plugin but one that most people already have plus all the "deleted" info actually is deleted during the conversion.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


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
  •