Urls in a HTML document

What are the advantages of making an url relative to Site
Root? Why some
people making the url in this way, although relative to
document much
simpler is?
thanks

If I have links in a server-side include, I must make those
links root
relative, since I have no idea where in the folder hierarchy
any given page
will be saved.
If I have links embedded in javascript, I must make those
links root
relative, for the same reason, since DW cannot find them to
manage them.
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
==================
"Stephen" <[email protected]> wrote in message
news:e78vp3$a48$[email protected]..
> What are the advantages of making an url relative to
Site Root? Why some
> people making the url in this way, although relative to
document much
> simpler is?
>
> thanks
>

Similar Messages

  • Live view doesn't correctly pass URL parameters from HTML docs?

    Running into something that I wonder if anyone else has seen.  I've created a site in DW CS5 with a local testing server (XAMPP on Win7), and if I use LiveView to view an HTML page that has a link to a PHP page that includes a URL parameter, the parameter shows up in the LiveView address bar, but the page doesn't seem to use it (trying to display an image where the file is built using $_GET to retrieve the parameter).  The same HTML page, displayed in a browser, works.  And if I then save the HTML page as a PHP page in DW, identical code, LiveView works.  Sure looks like LiveView will does not properly handle URL parameters from HTML documents...

    Sorry if I wasn't clear... the navigation works correctly; I get to the page I'm tyring to get to.  One of the things that page should do is display an image, the I use a URL parameter to build the image file name to retrieve.  The link in the first page is something like <a href="gallery.php?pg=1">.  Works fine if the first page (the one I'm navigating from) is a PHP page, doesn't work (with the same code which is only HTML) if the page is an HTML page.

  • How can I embed a HTML document onto my webpage?

    What I am trying to do: I am trying to make an image that has links to urls from different parts of the image.
    What I have done so far: I have built a photoshop image to embed on my webpage, following the instructions offered by many online forums, but cannot actually embed it as it isn't a url.
    Firstly, I sliced up an image, adding url's and alt tage etc to each slice. Then I did:
    File > Save for web > (Prest: JPEG High) > Save > (entered my file name) Format: HTML and Iamges > Save
    When I locate my file where I saved it, it has been saved as a Chrome HTML Document, but I can't then embed this on my website, using the 'embed code' tool I normally use. I presume this is because it doesn't begin with http:// ?
    Here is the HTML document I have made: file:///C:/Users/Daniel/Desktop/UK%20map%20interactive/Afternoon/UK-map-locations.html
    (If you can see this) This is the image I want and the links are working too but it's getting this onto an existing webpage.
    Other pages I have seen have talked about iamge maps, but I take it using the slice tool is better for what I am trying to acheive?
    Any suggestions/help would be greatly appreciated.

    One: Users can't see links on your local desktop. You would have to upload the files somewhere. Two: Images generally don't contain links. URLs are meta information build around the image in HTML. Three: Because of the previous point, whether you use sliced images or an image map doesn't matter, if you have no way of inserting the information into the native HTML structure of the web pages. If at all, you would open the HTML file in a suitable editor like Dreamweaver (or even a basic text editor) and copy&paste it into the web page sourcve code, but you'd still have to upload the image(s). The rest we can't know. You have not provided any link to the web site or told us which hosting provider you use. From your description it sounds like one of those "free" providers that restrict user's options to customize to the bare minimum and the rest is based on templates and plastered with advertising. In any case, the solution is not in Photoshop and you would have to read up on web design basics, HTML, CSS and al lthat on a more general level or review your hosting provider's guides on how to set all this up.
    Mylenium

  • URL iview with HTML file located in Portal server.

    I created URL iview pointing to HTML file located in the Portal server. When I try preview it is not working. We wanted to use this iview to create space between two iviews.
    This is going to be blank iview.
    I saved the HTML file same as where index.html file of webas is located.
    Please let me know what is missing here. What kind of path I need to give in the URL of the iview.

    Hi Nagesh,
    Are you saying that you created a HTML file on the file system of the portal server or did you create the HTML file within a KM repository on the portal?
    If it is the 1st option you should have the HTML file hosted under a webserver such as IIS or Apache and then use the URL that the website is created under.
    If it is a file within KM then open the properties of the HTML document that you have created and use the Access Link value as the URL for the iView.
    Please let me know if you need further clarification.
    Regards
    Daniel

  • How to display html document in browser?

    Hi, I want to display an html document in my directory using nescape. How can I do that?
    I know that AppletContext can display html, but it has to be in URL.
    How about a document in my directory?
    Help please.

    just specify the path, i.e. c:\my files\myDocument.html
    or
    file:///myfiles/myDocument.html
    Of course, I use IE, so Netscape might not like it. but this works for IE.

  • Problem parsing a html document

    Hi all,
    I need to parse a html document.
    InputStream is = new java.io.FileInputStream(new File("c:/temp/htmldoc.html"));
    DOMFragmentParser DOMparser = new DOMFragmentParser();
    DocumentFragment doc = new HTMLDocumentImpl().createDocumentFragment();
    DOMparser.parse(new InputSource(is), doc);
    NodeList nl = doc.getChildNodes();
    I get just 3 of the following nodes...... though the document htmldoc.html is a proper html doc..
    #document-fragment
    HTML
    #text
    Any suggestions/help are most welcome. Thanks

    Here's an example showing how to do this via javax.xml:
    import java.io.*;
    import java.net.*;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    public class HTMLElementLister {
         public static void main(String[] args) throws Exception {
              URLConnection con = new URL("http://www.mywebsite.com/index.html").openConnection();
              con.connect();
              InputStream in = (InputStream)con.getContent();
              Document doc = null;
              try {
                   DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                   DocumentBuilder db = dbf.newDocumentBuilder();
                   doc = db.parse(in);
              } finally {
                   in.close();
              NodeList nodes = doc.getChildNodes();
              for (int i=0; i<nodes.getLength(); i++) {
                   Node node = nodes.item(i);
                   String nodeName = node.getNodeName();
                   System.out.println(nodeName);
                   if ("html".equalsIgnoreCase(nodeName)) {
                        System.out.println("|");
                        NodeList grandkids = node.getChildNodes();
                        for (int j=0; j<grandkids.getLength(); j++) {
                             Node contentNode = grandkids.item(j);
                             nodeName = contentNode.getNodeName();
                             System.out.println("|- " + nodeName);
                             if ("body".equalsIgnoreCase(nodeName)) {
                                  System.out.println("   |");
                                  NodeList bodyNodes = contentNode.getChildNodes();
                                  for (int k=0; k<bodyNodes.getLength(); k++) {
                                       node = bodyNodes.item(k);
                                       System.out.println("   |- " + node.getNodeName());
    }

  • Wanting to open a HTML document in users default browser using Menu Items

    I have a couple of Menu items that I want to open up various HTML documents.
    menuHelpItem.addActionListener(new ActionListener()
         public void actionPerformed(ActionEvent evt)
    });I've seen a couple of 'solutions' to people asking about opening files, but none even compiled never mind ran. It's in my parent program, and any solution needing to throw IOException (lots of things annoyingly seem to) that'll mean the listeners need to which never seems to work. Even if it did though, the class would have to and so would all the others. Messy.
    Best I've done is open up a new JEditorPane based on the url of the HTML files, but this is definately not good enough as the font, layout, links are all screwed and if I could fix it, it would no doubt take longer than I have.
    So basically, say you have a button, how do you make it open "resources/SearchHelp.html"?

    "http://www.google.com"; //
    Interesting. I changed my code to this:
    private void showHelp(String url)
         try
              String[] cmd = new String[5];
              cmd[0] = "cmd.exe";
              cmd[1] = "/C";
              cmd[2] = "rundll32";
              cmd[3] = "url.dll,FileProtocolHandler";
              cmd[4] = PronunciationDictionary.class.getResource(url).toString();
              Process process = Runtime.getRuntime().exec( cmd );
         catch (IOException e)
              JOptionPane.showMessageDialog(this, "Unable to load help file. Please try again.", "Help - Dictionary A'la Lewis", JOptionPane.INFORMATION_MESSAGE);
    }and I printed out PronunciationDictionary.class.getResource(url).toString(); before trying it and that worked fine. I click on the buttons but nothing happens, no error which is good, but nothing else either, which is bad. I thought maybe I was just doing it wrong, so I tried replacing it with just http://www.google.com but same thing, nothing happened at all.

  • Viewing html document

    Hi all,
    I was referring to Brian's excellent blog on handling non-html documents for creating and displaying attachments. But how to open a html attachment? I am creating attachment of type htm document ( mimetype text/html) . But how to display it ? Please help.
    Regards
    Ananya

    oninputprocessing.
    fileupload ?= cl_htmlb_manager=>get_data(
                           request = request
                           id      = 'myUpload'
                           name    = 'fileUpload' ).
    file_name      = fileupload->file_name.
    file_mime_type = fileupload->file_content_type.
    file_length    = fileupload->file_length.
    file_content   = fileupload->file_content.
    CREATE OBJECT cached_response TYPE cl_http_response EXPORTING add_c_msg = 1.
      cached_response->set_data( file_content ).
      cached_response->set_header_field( name  = if_http_header_fields=>content_type
                                         value = file_mime_type ).
      cached_response->set_status( code = 200 reason = 'OK' ).
      cached_response->server_cache_expire_rel( expires_rel = 180 ).
      CALL FUNCTION 'GUID_CREATE'
        IMPORTING
          ev_guid_32 = guid.
      CONCATENATE runtime->application_url '/' guid INTO display_url.
      cl_http_server=>server_cache_upload( url      = display_url
                                           response = cached_response ).
      RETURN.
    and in layout
    <% if not display_url is initial . %>
    <script language="Javascript">
            window.open("<%= display_url%>");
          </script>
    <% endif . %>
    Is this what you are looking for?
    Regards
    Raja

  • Open html document

    what can i do so that i can using java application to make browser open a html document
    thank you for your help

    public class BrowserControl
    public static void displayURL(String url)
    boolean windows = isWindowsPlatform();
    String cmd = null;
    try
    if (windows)
                        try
                             Runtime.getRuntime().exec("start iexplore \""+url+"\"");
                        catch (java.io.IOException e)
                             System.out.println("caught ioexception") ;          
                             //e.printStackTrace();
                             try
                                  Runtime.getRuntime().exec("cmd /c start iexplore \""+url+"\"");
                             catch(Exception ee)
                                  System.out.println("caught again ee") ;          
                                  ee.printStackTrace();
                                  // cmd = 'rundll32 url.dll,FileProtocolHandler http://...'
                                  cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
                                  Process p = Runtime.getRuntime().exec(cmd);
    else
    // Under Unix, Netscape has to be running for the "-remote"
    // command to work. So, we try sending the command and
    // check for an exit value. If the exit command is 0,
    // it worked, otherwise we need to start the browser.
    // cmd = 'netscape -remote openURL(http://www.javaworld.com)'
    cmd = UNIX_PATH + " " + UNIX_FLAG + "(" + url + ")";
    Process p = Runtime.getRuntime().exec(cmd);
    try
    // wait for exit code -- if it's 0, command worked,
    // otherwise we need to start the browser up.
    int exitCode = p.waitFor();
    if (exitCode != 0)
    // Command failed, start up the browser
    // cmd = 'netscape http://www.javaworld.com'
    cmd = UNIX_PATH + " " + url;
    p = Runtime.getRuntime().exec(cmd);
    catch(InterruptedException x)
    System.err.println("Error bringing up browser, cmd='" +
    cmd + "'");
    System.err.println("Caught: " + x);
    catch(Exception x)
    // couldn't exec browser
    System.err.println("Could not invoke browser, command=" + cmd);
    System.err.println("Caught: " + x);
    * Try to determine whether this application is running under Windows
    * or some other platform by examing the "os.name" property.
    * @return true if this application is running under a Windows OS
    public static boolean isWindowsPlatform()
    String os = System.getProperty("os.name");
    if ( os != null && os.startsWith(WIN_ID))
    return true;
    else
    return false;
    * Simple example.
    public static void main(String[] args)
    displayURL("http://www.javaworld.com");
    // Used to identify the windows platform.
    private static final String WIN_ID = "Windows";
    // The default system browser under windows.
    private static final String WIN_PATH = "rundll32";
    // The flag to display a url.
    private static final String WIN_FLAG = "url.dll,FileProtocolHandler";
    // The default browser under unix.
    private static final String UNIX_PATH = "netscape";
    // The flag to display a url.
    private static final String UNIX_FLAG = "-remote openURL";

  • Javadoc HTML document to contain external package information

    Hi there:
    I would like to know how to issue the proper command line to generate a javadoc html document containing external packages. I found the the -group option, can anyone provide some insights to this?
    I have one java source that use java.sql package, I like to be able to generated the html document to show everything associated with the java.sql package in addition to my own java program.
    Thanks, Joseph

    There are two ways to do this: (most people use the second approach)
    1) Include package and class pages for both your packages and the java.sql.package This requires that you have the java.sql
    source files and run javadoc on them both:
    javadoc -d docs -sourcepath <paths> com.yourpackage java.sql
    where <paths> is the paths to your package and java.sql
    source files (semi-colon separated on Windows).
    To get the source files for java.sql you might be able to use
    the source files in src.zip that comes with the J2SDK, but
    the package.html file is not included. You could re-construct
    that from the HTML page on our website (remove the table of
    classes from overview-summary.html), or just get the entire
    source release from:
    http://java.sun.com/j2se/javadoc/faq/index.html#sourcecode
    which has the complete source code.
    2) Include package and class pages for only your packages, and
    just links to existing java.sql documentation.
    javadoc -d docs -link <URL> -sourcepath <path> com.yourpackage
    where <URL> is http://java.sun.com/j2se/1.4/docs/api
    and <path> is the path to your source files.
    If your terminal window cannot ping that URL, then you must
    copy package-list from that location to your local drive and
    use -linkoffline instead (look up in the docs).
    -Doug Kramer
    Javadoc team

  • Why does Thunderbird 31.1.2 see .url files as text documents? As a result, opening with any browser shows only text that are properties of the .url.

    I have an email with .url attachments. When I click on them I get a messages similar to this:
    You have chosen to open: Test.url
    which is: Text Document (5.0KB)
    from: mailbox://
    What should Thunderbird do with this file?
    If I select "Open with Firefox" I get a local page open up in Firefox with the address:
    file:///C:/Users/Scott/AppData/Local/Temp/Test.url-1.txt
    and the contents of this page:
    [InternetShortcut]
    URL=http://www.vrbo.com/xxxxxx
    IDList=
    IconFile=http://resources.vrbo.com/resources/xxxxx/images/favicon.ico
    IconIndex=1
    [{000214A0-0000-0000-C000-000000000046}]
    Prop3=19,2
    If I choose to save the .url file to the desktop it opens correctly in Firefox.
    Can someone assist me with this?
    Anyone???

    This issue can be caused by an old bitmap version of the Helvetica or Geneva font or (bitmap) fonts that Firefox can't display in that size.
    Firefox can't display some old bitmap fonts in a larger size and displays gibberish instead.
    You can test that by zooming out (View > Zoom > Zoom Out, Ctrl -) to make the text smaller.
    Uninstall (remove) all variants of that not working font to make Firefox use another font or see if you can find a True type version that doesn't show the problem.
    There have also been fonts with a Chinese name reported that identify themselves as Helvetica, so check that as well.
    Use this test to see if the Helvetica font is causing it (Copy & Paste the code in the location bar and press Enter):
    <pre><nowiki>data:text/html,
    Helvetica<br><font face="Helvetica" size="25">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</font><br>
    Helvetica Neue<br><font face="Helvetica Neue" size="25">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</font>
    </nowiki></pre>
    You should reset the network.http prefs that show user set on the about:config page.<br />
    Not all websites support http pipelining and if they do not then you can have issues with images or other problems.
    See also http://kb.mozillazine.org/Images_or_animations_do_not_load#First_steps

  • How to parse a html document?

    I am trying to parse an html document that I load from a url over the internet. The html is not well formed but thats ok. The problem is the document builder throws an exception because the document is not well formed.
    Can I parse a html document using the document builder?
    Please note that I set validating to false and the parse still has a fatal errror saying <meta> tag must have a corresponding </meta> tag.
    I am using code like the following.....
    DocumentBuilderfactory = DocumentBuilderFactory.newInstance();
    factory.setValidating(false);
    DocumentBuilder db = factory.newDocumentBuilder();
    doc = db.parse(urlString);

    The html is not well formed but thats ok.No, it isn't.
    "Validation" means checking that the XML conforms to a schema or a DTD. Don't confuse that with checking whether the XML is well-formed, which means whether it follows the basic rules of XML like opening tags have to have matching closing tags. Which is what your message is telling you -- your file isn't well-formed XML.
    So sure, you can parse HTML or anything else with an XML parser, just be prepared to be told it isn't well-formed XML.
    If you want to clean up HTML so that it's well-formed XML, there are products like HTMLTidy and JTidy that will do that for you.

  • Handling Of Non-HTML Documents

    Hi everyone,
    for the PDF printout functionality in our BSPs we are using the technique described form Brian McKellar in this weblog:
    /people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents
    It works great, but not in all systems.
    We are on a 5 system landscape and it works in two systems. The coding is transportet thru all systems and is exactly the same in all systems.
    I have implemented the test progamm from Brian and it works also only in the same two systems.
    Now I have bought his book "Advanced BSP Programming", but it dose'nt help.
    Maybe it depends on the ICM cache properties? Any ideas?
    Thanks for the help!
    Regards,
    Stephan

    Hi together,
    I get the following error message:
    Following error text processed in system:
    BSP Exception: Das Objekt E3FF8C1DB39E2A448DB1CD3E3C93533C.pdf in der URL /sap(bD1lbiZjPTAwMSZzPVNJRCUzYUFOT04lM2FwcnZtYWluX1BSVl8wMCUzYV9QWHZRU2FWZXlEY2lZY2NCNTNWRVVFMXF1NXUta2JUUTducGdHalYtQVRUJmk9MSZ3PTQ5NTAwMDAr)/bc/bsp/sap/yy_chm_mm_opp/E3FF8C1DB39E2A448DB1CD3E3C93533C.pdf ist nicht gültig.
    The generation of the PDF is ok. We are using Smart Forms and convert the OTR output via FUBA CONVERT_OTF into PDF.
    The systems are on the same release level, support package, kernel patch and all are Unicode systems.
    This is my coding: Method - DO_HANDLE_EVENT
    *       --- fill HTTP response        CREATE OBJECT lr_cached_response               EXPORTING add_c_msg = 1.        lv_pdf_xstring = lv_content.        lv_pdf_len = XSTRLEN( lv_pdf_xstring ).        lr_cached_response->set_data( data   = lv_pdf_xstring                                   length = lv_pdf_len ).        lr_cached_response->set_header_field(           name  = if_http_header_fields=>content_type           value = 'application/pdf' ).        CALL METHOD lr_cached_response->if_http_response~set_status          EXPORTING            code   = 200            reason = 'OK'.        CALL METHOD      lr_cached_response->if_http_response~server_cache_expire_rel          EXPORTING            expires_rel       = 180*           ETAG              =*           BROWSER_DEPENDENT = ' '            .        CALL FUNCTION 'GUID_CREATE'          IMPORTING            ev_guid_32 = lv_guid_32.        CONCATENATE runtime->application_url '/' lv_guid_32 '.pdf'               INTO gv_display_url.        cl_http_server=>server_cache_upload( url = gv_display_url        response = lr_cached_response ).
    I have checked my systems today, and now 3 of 5 system are ok. We don't changed the coding, the smart form and no updates are implementet on this system. I don't understand this behavior and maybe tomorrow I get the error again.
    Any thought?
    Regrads, Stephan

  • The requested URL /Site/Home.html was not found on this server - HELP!

    NOT FOUND: The requested URL /Site/Home.html was not found on this server.
    This comes up when I type in my website address. I am new to this, have created my website on iweb, bought the domain name and purchased web hosting with 123-REG. I ask for their help but have only received the same rote info and nothing that has solved my problem.
    I am using Cyberduck as my FTP client but tried Classic FTP for macs before this and although it says that I am connected, it is saying that it can not change to the directory hosting10.123-reg.co.uk and asks if I have permission to be using it? I am not sure what to do?
    Please could someone advise me?
    Thanks!

    Welcome to the Apple Discussions. Since you're not using MobileMe these pages might be of some help to you:
    http://homepage.mac.com/thgewecke/iwebserver.html
    http://iwebfaq.org/site/iWebFolderFTP.html
    http://docs.info.apple.com/article.html?path=iWeb/2.0/en/6838.html
    OT

  • Preview of HTML document in KM Navigation iView

    Hi all!
    I need your help. I would like to create layout set which would be able to display tree on the left side and preview of HTML document on the right side of content area. If I click on HTML document in the tree I need to see his preview. I thought that I can resolve this by "Explorer and Preview" profile. But unfortunely it doesn't work. Has someone any experience with the profile? Or can someone advice to me how create new layout set?
    I found this links, but they didn't help me much.
    http://help.sap.com/saphelp_nw04/helpdata/en/4e/02573d675e910fe10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/96/248cd68f23774fb74dfc18a2994d8f/frameset.htm
    Thank you in advance for any reply!
    Regards
    Zbynek

    Hi Saurabh,
    Using the presentation settings in Details can sometimes
    be tricky since it remembers the context of which iView
    called it. Make sure you open the details out of the iView
    in which you want the customizations to be in effect.
    Otherwise, changing it in the configuration is a
    bit more straightforward in its effects.
    Regards,
    Darin

Maybe you are looking for

  • I cannot get iplan to open

    I have been using iplan for the last three months, today it just will not open, i have upgraded it and turned the ipad off and on and it still wont open.  Have you any suggestions

  • HT4352 Do I have to be connected to an Internet connection before I can use home sharing on apple tv

    Do I have to be connected to an Internet connection before I can use home sharing on apple tv

  • Order of the output

    I have a query Eg: select id,name from user where user.id in ('a7','a6','a3',....); --- ID's are in different order not, in ascending or descending the output of the above query is something like id name a3 a3_name a7 a7_name a6 a6_name But I would l

  • Update/Upgrade problem

    I have Aperture on my iMac at home andat my MacBookPro. My iMac requested for an update to 3.2 – which Idid. The problem is I can not update Aperture on my MacBookPro. Itdoes not work via Appstore, download from the Apple web page is notpossible to i

  • Can I update iOS on IPAD

    I have an IPAD with 57 GM available memory.  I am currently running iOS 5.1.1.  Can I upgrade to a more recent version?  I have treid connecting to ITunes, but no luck.