Re: base href > url resolves in DW and not in browser or vv

Discussion in 'HTML' started by Mark Parnell, Jul 16, 2004.

  1. Mark Parnell

    Mark Parnell Guest

    Laiverd.COM wrote:
    > I have maybe stepped on some dreamweaver problem that is too painfull

    to be
    > solved in that newsgroup ;-) , so I thought it might be wise to post

    it
    > here, hoping that one of you can show me the way to the light, and

    point out
    > where I'm going wrong.


    Ask brucie - he'll give you a nice list of alternate editors.

    > Though I've been creating websites for quite some time now, I have

    never
    > used <base href> before. I am now in the situation where I either

    have to
    > 'invent' some procedure to automatically create absolute paths, or to

    use
    > this tag.


    Why? Chances are there is an alternative. Tell us what you are really
    trying to do, and we may be able to help.

    > This is what I have tried:
    > Resolves in browser but not in dreamweaver:
    > <base href="http://localhost/private/ndi/">
    > src="images/general/logo_ndi.gif"
    > Browser shows this path:
    > http://localhost/private/ndi/images/general/logo_ndi.gif


    Looks like a bug in Dreamweaver to me.

    > Resolves in Dreamweaver but not in browser
    > <base href=http://localhost/private/ndi>
    > src="/images/general/logo_ndi.gif"
    > Browser shows this path: http://localhost/images/general/logo_ndi.gif


    Again, the browser is correct, Dreamweaver is wrong. According to
    RFC1808 (which the HTML spec defers to in this situation), "If the
    embedded URL path is preceded by a slash "/", the path is not
    relative". If the path isn't relative (i.e., it is absolute), the base
    URI is irrelevant.

    > If someone could shed a light on this. I looked up some info but did

    not
    > find an answer; I feel this somehow is Dreamweaver related, although

    I find
    > that hard to belive.


    Why so hard to believe?

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
    Mark Parnell, Jul 16, 2004
    #1
    1. Advertising

  2. Mark Parnell

    Laiverd.COM Guest

    Hi Mark,

    Thanks for your reply. Well actually I don't want to change editor right now
    ;-) Might indeed be a bug in Dreamweaver however. Anyway I am creating this
    site with quite some (about 5) php includes per page that in turn will hold
    paths to for instance javascript files and stylesheets. At any time - no
    matter how deep the directory structure - obviously I need these paths to be
    correct. It's no problem passing the path to root as a php variable, but
    that just seems an awkward way of achieving my goal, and that's why I
    thought base href might come in handy.

    John

    --
    ----------------------------------------------------------------------------
    -----------
    RESOURCES
    http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash
    ----------------------------------------------------------------------------
    -----------
    TUTORIALS at
    www.laiverd.com
    Flash & PHP Emailform
    Using textfiles in Flash
    ----------------------------------------------------------------------------
    -----------
    Laiverd.COM, Jul 16, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Laiverd.COM
    Replies:
    0
    Views:
    452
    Laiverd.COM
    Jul 16, 2004
  2. Mark Parnell
    Replies:
    0
    Views:
    402
    Mark Parnell
    Jul 16, 2004
  3. Ninan
    Replies:
    3
    Views:
    278
    Jack Klein
    Mar 3, 2006
  4. Matty J
    Replies:
    0
    Views:
    353
    Matty J
    Jun 11, 2010
  5. Vincent van Beveren

    BASE HREF and A HREF="#" onclick="..."

    Vincent van Beveren, Jul 6, 2006, in forum: Javascript
    Replies:
    2
    Views:
    310
    Vincent van Beveren
    Jul 6, 2006
Loading...

Share This Page