Center html preview in browser window

I've recently created a 800x400 pixel flash document and
published it to html. When previewing in my browser it positions
itself in the upper left-hand corner of my window. What adjustments
to the publishing settings (or html coding) do I need to apply to
center it vertically and horizontally in my browser window at
preview? Thanks for any responses.
typograffer

it would be of better help if you listed your site. Or if you
posted your code, i could help you with this issue.

Similar Messages

  • How to html edit/ enter browser-window-title

    how to html edit/ enter browser-window-title?
    harpo

    I think this is what you mean any way hope it helps.
    open the .html file in text edit for the page you want to change. then look for
    <title>whatever your title is</title>
    and just change the text whatever your title is for whatever you want. the line of code is located at the top of the page under the line that reads
    <meta name="Generator" content="iWeb 1.1.2" />
    not sure if this was the answer to your question but i hope its helped.
    steve

  • How to center flash movie in browser window

    Can anyone explain how to horizontally center my Flash movie in the web browser window after publishing?
    A bit of background:
    I was able to achieve this using <center></center> tags a few years ago. But I have since upgraded to CS5 and I understand that this old method is now obsolete.
    I have found a few threads/forums that address this, but I know nothing about HTML and these threads don't help me because they assume you have more knowledge than I possess. When opening up the index.html file in Dreamweaver I can't find anything that looks vaguely familiar to what is being discussed. I have found some code samples using <div></div> tags but have no idea where to place it.
    So I will need it explained to me in a step by step fashion, including which file I need to fix and what program I should use. Code samples will be very welcome if you can tell me exactly where it goes.
    Thanks in advance...

    Just realized that there is no scrolling functionality with the .swf generated from the new CS5. Can anyone help out by providing revised code for centering and scrolling?
    I found something elsewhere in the forums that worked for both centering and scrolling that worked fine yesterday, but upon visiting my site today for testing, it did not allow the scrolling, and centering did not work in Firefox. Tested both Safari and Firefox on 2 Macs running Snow Leopard.
    Again, much appreciated - nice to visit forums where people are interested in helping instead of screaming at each other. Will visit the Illustrator or Indesign forum to see if I can help out someone there...

  • How to center wireframe layout in browser window

    HELP!!
    I've created a set of wireframes for a website in Proto but when I bring them up in a browser window the layout is always left aligned and I cannot figure out how to get the layout to center in the browser window.
    I've used margin: 0 auto; on the container div but it does no good, the layout stays left aligned. I'm about to pull my hair out on this one.
    The URL is http://www.bluegrasswebservices.com/kpp/index.html
    Thanks for your help
    Gary

    I had the same issue and decided to make the change myself. All you have to do is add a wrapper div, match it to the width of your file and center it via CSS. It would def be much more convenient to have this as an option, but alas your solution is below....
    HTML
    <div id="wrapper">
    Your page content
    </div>
    CSS
    #wrapper{
        width: (width of your content);
        position: relative;
        margin: 0 auto;

  • Can not add Google in Preview in Browser Window

    Hi
    I have just started usning DW 13.2 CC on win7.  In Preferences>Preview in Browser> Help, OK, Cancel Buttons are missing. Only + - Buttons are visible. I followed to next window and added Name and pointed to .exe file it took me back to <Preview in Browser> Help, OK, Cancel Buttons are missing. So how do I add Google?

    Not sure what the OK and Cancel buttons are, but by using the following procedure, you will be able to add your favourite browser.
    To add a browser to the list, click the Plus button, complete the Add Browser dialog box, and then click OK.
    To delete a browser from the list, select the browser, and then click the Minus button.
    To change settings for a selected browser, click the Edit button, make changes in the Edit Browser dialog box, and then click OK.
    Select the Primary Browser or the Secondary Browser option to specify whether the selected browser is the primary or secondary browser.  F12 (Windows) or Option+F12 (Macintosh) opens the primary browser; Control+F12 (Windows) or Command+F12 (Macintosh) opens the secondary browser.
    Select Preview Usin
    Select File > Preview In Browser > Edit Browser List.
    Select Preview Using Temporary File to create a temporary copy for previewing and server debugging. (Deselect this option if you want to update the document directly.)
    Please ignore the images of the plus and minus buttons, these are courtesy of this forum and has zilch to do with DW

  • Opening new browser window from View Library links

    On some of the documentation pages, e.g. http://www.oracle.com/technology/documentation/ias.html , a new browser window is opened using target=new_win in the HTML code. This window will be re-used if the user goes back and clicks on another, similar link. It's better to use target=_blank for this purpose, because that would ensure that a new browser window is opened every time.

    You would have to a) swap the image, and b) expose a
    previously hidden layer
    that superimposes the image with a transparent GIF on which
    the onClick
    behavior has been applied.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "tldesignstudios" <[email protected]> wrote
    in message
    news:e7vfhm$1hf$[email protected]..
    > Hi all, does anyone know if it is possible to set a
    swapped image to open
    > a new browser window on a click command? Any help woul
    dbe much
    > appreciated. thank you in advance. :)

  • Faux column background not aligned in smaller browser window...

    I'm working on a three-column webpage.  I'm using fixed-width columns, with the left and right columns floated (started with a dreamweaver layout).  I am also using a background applied to the <body> tag to apply the faux column look, so that the side column backgrounds flow all the way down the page.
    My layout is a total of 780px wide, but the background image I'm using is 2000px wide.  It's the same image that was used in the previous version of the website, and I can only guess that the image is that wide to "fill" the extra space around the main content when the browser window is wider than 780px.  Because the image is so wide, I have it styled to center on the page.  When my browser window >= 780px wide, everything looks great... the faux columns line up perfectly with the divs.  However, when I make the window less than 780px, things get messy.
    My layout elements stay where they are, meaning that the left edge of the container stays aligned with the left edge of the screen and a scroll bar appears at the bottom.  However, since my background is set to center itself, it continues to try to center itself in the browser window.  Basically, the content is not centered in the browser window, but the background is, causing the faux columns to not line up with the divs.  The relevant CSS I have applied is:
    body  {
        font: 100% Verdana, Arial, Helvetica, sans-serif;
        margin: 0;
        padding: 0;
        text-align: center;
        font-size: 12px;
        color: #666666;
        background-repeat: repeat-y;
        background-position: center;
        background-image: url(../img/BG-gray.gif);
    #container {
        width: 780px;
        margin: 0 auto;
        text-align: left; /* this overrides the text-align: center on the body element. */
    Note: everything within the container div stays where it should relative to the container, so I didn't include the CSS for them, though I can post it up later if you really need to see it.
    Is there a way to keep everything lined up in a smaller browser window? Or, would it be better to trim down the background image to the same width as the container?
    Sorry for the long message, but I'm new at this.  Please don't eat me.

    Same problem, only worse.  That causes the background to show from the very left edge of the image.  All my text is in the gray area in the example below.  Let me try to clarify...
    The background image is something like this (colors are for clarity):
    (filler)
    Left faux column
    Main content goes here. This is always in the center of the browser window.
    Right faux column
    (filler)
    Where the combined width of the blue, white, and red sections is 780px.  This is what I want my layout to line up with, the blue and red columns being the faux left and right columns, respectively.  The gray areas are "filler" that colors the excess width in browser windows that are wider than the fixed width of the main content.  With the background set to centered, the white stripe is always centered in the browser window.  As long as the window is wider than my layout, the layout is centered in the browser window as well.
    I'm looking for a way to either center the background relative to the layout container, not the browser window, or to keep the layout container centered in the browser window when the window is narrower than the layout.

  • Browser window

    How do I make a new browser window open in center of the
    screen or center of the current browser window?
    Here's my code:
    <div align="center">
    <p> </p>
    <p><a href="#"><img src="index.jpg"
    width="362" height="527" border="0"
    onclick="MM_openBrWindow('forside.htm','Kalender','width=750,height=750')"
    /></a></p>
    </div>
    Kasper

    Use our OpenBrowser extension. Many more options too.
    http://www.fourlevel.com/dreamweaver/extensions/openbrowser/index.htm
    Regards,
    ..Trent Pastrana
    www.fourlevel.com
    "mju300" <[email protected]> wrote in
    message
    news:epfn3f$jr0$[email protected]..
    > How do I make a new browser window open in center of the
    screen or current
    > browser window?
    >
    > Here my code:
    >
    > <div align="center">
    > <p> </p>
    > <p><a href="#"><img src="index.jpg"
    width="362" height="527" border="0"
    >
    onclick="MM_openBrWindow('forside.htm','Kalender','width=750,height=750')"
    > /></a></p>
    > </div>
    >
    > Kasper
    >

  • Preview in browser shows html code

    Can't get DW to display my design, I go to "preview in
    browser" and it goes to the browser and shows the html code
    instead. Can someone help me fix that?

    <%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
    <!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" />
    <!-- TemplateBeginEditable name="doctitle" -->
    <title>Untitled Document</title>
    <!-- TemplateEndEditable -->
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
    <style type="text/css">
    <!--
    body {
    font: 100% Verdana, Arial, Helvetica, sans-serif;
    background: #666666;
    margin: 0; /* it's good practice to zero the margin and
    padding of the body element to account for differing browser
    defaults */
    padding: 0;
    text-align: center; /* this centers the container in IE 5*
    browsers. The text is then set to the left aligned default in the
    #container selector */
    color: #000000;
    /* Tips for Elastic layouts
    1. Since the elastic layouts overall sizing is based on the
    user's default fonts size, they are more unpredictable. Used
    correctly, they are also more accessible for those that need larger
    fonts size since the line length remains proportionate.
    2. Sizing of divs in this layout are based on the 100% font
    size in the body element. If you decrease the text size overall by
    using a font-size: 80% on the body element or the #container,
    remember that the entire layout will downsize proportionately. You
    may want to increase the widths of the various divs to compensate
    for this.
    3. If font sizing is changed in differing amounts on each div
    instead of on the overall design (ie: #sidebar1 is given a 70% font
    size and #mainContent is given an 85% font size), this will
    proportionately change each of the divs overall size. You may want
    to adjust based on your final font sizing.
    .twoColElsLtHdr #container {
    width: 46em; /* this width will create a container that will
    fit in an 800px browser window if text is left at browser default
    font sizes */
    background: #FFFFFF;
    margin: 0 auto; /* the auto margins (in conjunction with a
    width) center the page */
    border: 1px solid #000000;
    text-align: left; /* this overrides the text-align: center
    on the body element. */
    .twoColElsLtHdr #header {
    background: #DDDDDD;
    padding: 0 10px; /* this padding matches the left alignment
    of the elements in the divs that appear beneath it. If an image is
    used in the #header instead of text, you may want to remove the
    padding. */
    .twoColElsLtHdr #header h1 {
    margin: 0; /* zeroing the margin of the last element in the
    #header div will avoid margin collapse - an unexplainable space
    between divs. If the div has a border around it, this is not
    necessary as that also avoids the margin collapse */
    padding: 10px 0; /* using padding instead of margin will
    allow you to keep the element away from the edges of the div */
    /* Tips for sidebar1:
    1. Be aware that if you set a font-size value on this div,
    the overall width of the div will be adjusted accordingly.
    2. Since we are working in ems, it's best not to use padding
    on the sidebar itself. It will be added to the width for standards
    compliant browsers creating an unknown actual width.
    3. Space between the side of the div and the elements within
    it can be created by placing a left and right margin on those
    elements as seen in the ".twoColElsLtHdr #sidebar1 p" rule.
    .twoColElsLtHdr #sidebar1 {
    float: left;
    width: 12em; /* since this element is floated, a width must
    be given */
    background: #EBEBEB; /* the background color will be
    displayed for the length of the content in the column, but no
    further */
    padding: 15px 0; /* top and bottom padding create visual
    space within this div */
    .twoColElsLtHdr #sidebar1 h3, .twoColElsLtHdr #sidebar1 p {
    margin-left: 10px; /* the left and right margin should be
    given to every element that will be placed in the side columns */
    margin-right: 10px;
    /* Tips for mainContent:
    1. If you give this #mainContent div a font-size value
    different than the #sidebar1 div, the margins of the #mainContent
    div will be based on its font-size and the width of the #sidebar1
    div will be based on its font-size. You may wish to adjust the
    values of these divs.
    2. The space between the mainContent and sidebar1 is created
    with the left margin on the mainContent div. No matter how much
    content the sidebar1 div contains, the column space will remain.
    You can remove this left margin if you want the #mainContent div's
    text to fill the #sidebar1 space when the content in #sidebar1
    ends.
    3. To avoid float drop, you may need to test to determine the
    approximate maximum image/element size since this layout is based
    on the user's font sizing combined with the values you set.
    However, if the user has their browser font size set lower than
    normal, less space will be available in the #mainContent div than
    you may see on testing.
    4. In the Internet Explorer Conditional Comment below, the
    zoom property is used to give the mainContent "hasLayout." This
    avoids several IE-specific bugs that may occur.
    .twoColElsLtHdr #mainContent {
    margin: 0 1.5em 0 13em; /* the right margin can be given in
    ems or pixels. It creates the space down the right side of the
    page. */
    .twoColElsLtHdr #footer {
    padding: 0 10px; /* this padding matches the left alignment
    of the elements in the divs that appear above it. */
    background:#DDDDDD;
    .twoColElsLtHdr #footer p {
    margin: 0; /* zeroing the margins of the first element in
    the footer will avoid the possibility of margin collapse - a space
    between divs */
    padding: 10px 0; /* padding on this element will create
    space, just as the the margin would have, without the margin
    collapse issue */
    /* Miscellaneous classes for reuse */
    .fltrt { /* this class can be used to float an element right
    in your page. The floated element must precede the element it
    should be next to on the page. */
    float: right;
    margin-left: 8px;
    .fltlft { /* this class can be used to float an element left
    in your page */
    float: left;
    margin-right: 8px;
    .clearfloat { /* this class should be placed on a div or
    break element and should be the final element before the close of a
    container that should fully contain a float */
    clear:both;
    height:0;
    font-size: 1px;
    line-height: 0px;
    -->
    </style><!--[if IE]>
    <style type="text/css">
    /* place css fixes for all versions of IE in this conditional
    comment */
    .twoColElsLtHdr #sidebar1 { padding-top: 30px; }
    .twoColElsLtHdr #mainContent { zoom: 1; padding-top: 15px; }
    /* the above proprietary zoom property gives IE the hasLayout
    it needs to avoid several bugs */
    </style>
    <![endif]--></head>
    <body class="twoColElsLtHdr">
    <div id="container">
    <div id="header">
    <h1><img src="../MASTHEAD.jpg" width="720"
    height="269" /></h1>
    <!-- end #header --></div>
    <div id="sidebar1">
    <blockquote>
    <pre> </pre>
    </blockquote>
    <h3>Landscaping</h3>
    <p><strong>Lawn Care</strong></p>
    <p><strong>Chemical
    Services</strong></p>
    <p><strong>Tree
    Services</strong></p>
    <p><strong>Retaining
    Walls</strong></p>
    <p><strong>Water
    Gardens</strong></p>
    <p><strong>Special
    Projects</strong></p>
    <p> </p>
    <!-- end #sidebar1 --></div>
    <div id="mainContent">
    <h1> GET THE EDGE</h1>
    <p>Custom Edges Enterprises gives you the edge when it
    comes to landscape design, implementation and
    maintenance.</p>
    <p>Residential and commercial properties thrive under
    the supervision and attention of Custom Edges
    Enterpirses.</p>
    <!-- end #mainContent --></div>
    <!-- This clearing element should immediately follow the
    #mainContent div in order to force the #container div to contain
    all child floats --><br class="clearfloat" />
    <div id="footer">
    <p>Footer</p>
    <!-- end #footer --></div>
    <!-- end #container --></div>
    </body>
    </html>

  • Preview in browser change html code

    Hi!
    Often when I sketch web sites in Fireworks I preview the page
    as an image in my browsers, just to get a feeling of the page in
    its real environement, so to speak. Often my web sites are aligned
    to the center but Fireworks just put the image to the left and
    don´t remove the standard body margins.
    Is there a way for me to change the html code used in the
    preview in browser command?

    why not make a standard page (in dw) with zero margins and
    padding, and
    single div centred with one image and then place the native
    fireworks
    png in there, save and preview that page from DW and then
    when you work
    on your fw image just save it and press refresh in your
    browser window.
    when you do a new project simply swap the new fw png for the
    old fw png ;)
    JoeyD1978 wrote:
    > My work flow is probably a bit different, so this might
    be way out in left
    > field for you. But I create a new document and make it
    very large (2400x3000+).
    > I then center what will be my layout in that document
    and design from there.
    >
    > When I preview the layout, I just center the layout in
    my browser with the
    > horizontal scroll bar. This is the only way I've ever
    figured out how to get
    > around this same problem.
    >

  • Unable to center webpage in browser window!!!

    Hi! I have looked for and tried almost everything to center my webpage in the browser window yet it doesn't work!
    this is the page: www.claudechalhoub.com. I want the page to be centered regardless of the browser window size!
    I have included the following code in my html:
    <style type="text/css">
    body {
    text-align:center; /*For IE6*/
    margin: 0;
    padding: 0;
    min-width:770px;
    background-image: url(pictures/lastimage.jpg);
    background-repeat: no-repeat;
    background-color: #000;
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
    color:#FFF;
    font-style: normal;
    #wrapper {
    width: 770px;
    margin:0 auto;
    text-align: left;
    </style>
    And then I've included:
    <body>
    <div id="wrapper">
    <div id="ap_text"> "The beauty of Claude Chalhoub's music is that it doesnt sound "new" at all. It sounds familiar, even if you have never listened to Arabic music (or classical music) at all. As if it had always been there. It's as natural as breathing. And that's what great art is all about – making the difficult seem easy."</div>
    </div><!--close the wrapper div -->
    </body>
    I can not figure out what is wrong for it not to work!
    Any guidance???

    If you still insist you want to have your image within the background image, you could just change your 'body' css tag as follows:
    body {
    text-align:center; /*For IE6*/
    margin: 0;
    padding: 0;
    min-width:770px; /*minimum fixed width to suit majority of smallest browser widths*/
    background-image: url(pictures/lastimage.jpg);
    background-repeat: no-repeat;
    background-color: #000;
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
    color:#FFF;
    font-style: normal;
    background-position: center top;
    Center positions is horizontally and top positions it vertically.

  • Why can't I drag an image or html file into a browser window with Firefox 17

    to get a quick view of various images or html files, I like simply dragging the files from my local drive into a Firefox browser window.
    since upgrading to FF 17, I can no longer do that. a NO symbol comes up when attempting this. and Dreamweaver will no longer preview with Firefox, even though it's my designated, preferred browser.
    anybody know if both of these are some setting or something?

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Can not center Html flash file in a browser..

    Hi all,
    After i publish a flash project and try to open the html file with a browser it is always at the left of the browser, why?
    In addition i have some problems with size too..
    What is the size of the browser's area for viewing any content(i mean the parts below the navigation tabs to start menu)?
    How can i adjust my project to this?
    Thx for helping.
    Note: My html settings seems true, it says "center center" but i dont know how to solve this.

    The placement of your .swf on a Web page and it's alignment in the browser window is a function of HTML and CSS (styling of the Web page), it has nothing to do with the Flash .swf. Remember, there is no such thing as a Flash Web site... only HTML, PHP, ASP, etc. Web sites that have some Flash content.
    While you can use Flash to auto generate that HTML, it's only a generic solution, really only meant to test the .swf on a Web page, and usually generates excessive and un-needed code... but it does let you see the .swf on a Web page.
    So depending on whether or not your .swf is to take up the entire Web page or just be one component of the Web page, you may need to use slightly different code to correctly place the .swf on the Web page, set the top margin, center the .swf, etc. To review a few basics on the layout of a Web page, here is a great source:
    http://www.w3schools.com/html/default.asp
    As for sizing, are you wanting the .swf to always stay the same size or "scale" as the browser window expands or shrinks?
    Best wishes,
    Adninjastrator

  • When previewed in browser or on the server the path of my web site repeats folders. However the "href" in the html code does not show the repetition in the path.

    If someone could help me on this one, this would be great. I am creating a web site that has several departments. I have categorized and saved each department in a main folder called "departments" and a subfolder for each one. In the Dreamweaver code view the pop-up menu links seem to show up properly, but when I preview in browser or upload to server "page not found" comes up because for some reason the address changes. Some parts of the address seem to be appearing twice, sometimes the entire path will appear twice as shown below:
    http://www.graphicmechanic.com/DEKALBCOUNTY/departments/parks-and-recreation/departments/p arks-and-recreation/pr-arabiamtn-map.html
    that is incorrect and it takes me to "web page cannot be found".
    It is obviously repeating the folders (hence the "departments/parks-and-recreation" twice. The correct link is:
    http://www.graphicmechanic.com/DEKALBCOUNTY/departments/parks-and-recreation/pr-arabiamtn- map.html
    The link issues are happening in the pop-up menu. For example if you go to http://www.graphicmechanic.com/DEKALBCOUNTY/departments/parks-and-recreation/pr-arabiamtn. html and rollover the link called "Arabia Mountain" in the links to the left side of the page, then click the pop-up menu link entitled "Arabia Mountain Map" that's where the problem occurs.
    Can anyone tell me how I can fix this problem. I don't know what I should do with the code since it already appears correct in html view.
    Please help if you can...
    Thanks in advance for any possible help you can provide...

    XonoBoom wrote:
    It is obviously repeating the folders (hence the "departments/parks-and-recreation" twice. The correct link is:
    http://www.graphicmechanic.com/DEKALBCOUNTY/departments/parks-and-recreation/pr- arabiamtn-map.html
    The link issues are happening in the pop-up menu.
    This problem usually happens when the menu is either a server-side include or a library item using links relative to the document. When you reference a page at a different level of the folder hierarchy, the document-relative links no longer point to the correct destination.
    Change the links in the menu to be relative to the site root.
    A document-relative link usually looks like this:
    <a href="../products/index.html">Products</a>
    A link relative to the site root begins with a forward slash like this:
    <a href="/products/index.html">Products</a>

  • Want to open a new browser window and display the html file in locale disk.

    Hi,
    I want to open a new browser window and display the html file in local drive. The below html applet work in local system successfully. But i deploy the same in web server (Tomcat) and try the same in client machine it does not work. Please help.
    Note:
    The class below fileopen.FileOpen.class i make it as a jar and put it in jre\ext folder at the client machine.
    ------------------------------------FileOpen.html(Tomcat)-----------------------------------------------------
    <html>
    <body >
    <applet code="OpenFile.class" archive="loadfile.jar" width="100" height="100">
    <param name="path" value="file://c:/open.html" />
    </applet>
    </body>
    </html>
    -------------OpenFile.java in server(Tomcat)--------------------------------------------
    public class OpenFile extends Applet implements ActionListener{
    String path = "";
    fileopen.FileOpen open = null;
    Button b = null;
    public void init(){
    path = getParameter("path");
    b = new Button("Open");
    b.addActionListener(this);
    add(b);
    public void actionPerformed(ActionEvent ae){
    try
    open = new fileopen.FileOpen(this,path);
    catch (Exception e){
    e.printStackTrace();
    -------------------------------------------FileOpen.java /Client JRE/ext----------------------------------------------------
    package fileopen;
    public class FileOpen
    AppletContext context = null;
    URL url = null;
    public FileOpen(Applet applet,String path)
    try
    if(null != applet){
    context = applet.getAppletContext();
    if (null != path)
    url = new URL(path);
    context.showDocument(url, "_blank");
    }catch(Exception ex)
    ex.printStackTrace();
    Please help to solve this issue very urgent.
    Thanks in advance.
    By,
    Saravanan.K.

    zzsara wrote:
    I want to open a new browser window and display the html file in local drive. ...Did you ever pause to consider how ridiculous that is?
    The best audience for applets is people off the internet. 'People off the internet' might be using a computer that has no (what was it?) 'open.html' in the root of the C: drive. In fact (shock horror) they may not even be running Windows, and would therefore probably have no 'C:' drive at all.
    If you do not intend to distribute this to people off the web, an application makes a lot more sense, but even then, you cannot rely on the document being there unless you 'put it there' (during installation, for instance).
    As the other poster intimated, applets can load documents off the local disk as long as they are trusted. Here is an example*, but note that it is not so rash as to presume any particular path or file, and instead leaves it to the user to choose the document to display.
    * The short code can be seen at SDNShare on the [Defensive Loading of Trusted Applets|http://sdnshare.sun.com/view.jsp?id=2315] post.
    On the other hand, a sandboxed applet can load any document coming from its own server via URL, or get showDocument(URL) to work. In that case, the JRE must recognize that the URL is from its own server, so the best way to form URLs for applet use is via the URL constructor
    new URL(getDocumentBase(), "path/to/open.html");That is how I form the URL in this [ sandboxed example of formatting source|http://pscode.org/fmt/sbx.html?url=/jh%2FHelpSetter.java&col=2&fnt=2&tab=2&ln=0]. Of course, in this case the applet loads the document, then parses the text to draw the formatted version, but the point is that an URL produced this way will work with showDocument(URL).
    I am pretty sure showDocument() in an applet off the internet will work with an URL pointing to a foreign (not its own) server, but it will not be able to load documents off the end user's local disks.
    I suggest a couple of things.
    - Try to express this problem in terms of what feature it is that you want to offer the end user. Your question jumps directly to a bad strategy for achieving ..who knows what? An example of a feature is "Shows the applet 'help' files on pressing F1".
    - A good way to indicate interest in a solution is to offer [Duke stars|http://wikis.sun.com/display/SunForums/Duke+Stars+Program+Overview] to match that interest.
    Edit 1:
    ..and please figure out how to use the CODE tags.
    Edited by: AndrewThompson64 on Sep 12, 2008 11:14 PM

Maybe you are looking for

  • Paper Paper box view on PDF created in INDCS3

    We are running Windows XP, Serv Pk 2, CS3. We have a form that contains a paper filled box behind a stroke. The frame from the paper filled box extends into the area behind the stroke. In InDesign CS3 the form appears and prints correctly. When expor

  • Single Host for netweaver/xi & Idoc settings in ale

    HI, In the case of a single system which is the R/3 system as well as the xi system...what settings are to be done from ALE to enable idoc processing...is this the same as a dual system configuration..or ? I am pasting some of the steps suggested for

  • Recent edits in CS6 are not showing in iPhoto?

    I am "editing in external editor" from iPhoto then editing in CS6 and saving as usual but the edit is not showing in iPhoto?

  • Weird echos and stuttering

    Weird things are going on with my Audigy 2 sound card: When I get a message with kopete I always hear a DING Ding ding, instead of one ding. When switching Phonon from Xine to Gstreamer backend, this works fine. But when running speaker test, I only

  • When I try to access PURCHASES in the iTunes store, the program crashes

    Every time I click on Purchases in the iTunes store it attempts to load my purchases (it seems) and then the program just crashes and Windows shuts it down. What's up with that? I can only access purchases through my iPod touch or iPhone & then trans