www.webdeveloper.com
Results 1 to 5 of 5

Thread: base href ignore

  1. #1
    Join Date
    Dec 2003
    Location
    Waardamme, Belgium
    Posts
    121

    base href ignore

    When displaying the results of an intranet seach i use a <base href=... > to point to the original locations of the graphic files in the documents.
    Some elements must be referenced using relative paths <script src=../scripts/xxx.js> and i can't use absolute path here for lots of reasons.
    Is there a way to say the browser "ignore the base href for following link" without using absolute paths?
    Maybe with javascript?

  2. #2
    Join Date
    Apr 2003
    Location
    UK
    Posts
    2,203
    My mistake, I thought the post was about the target not the href.

    I am well and truely embarrassed now :eek:
    Last edited by Mr J; 09-26-2004 at 08:07 AM.

  3. #3
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,277
    Originally posted by Mr J
    You could try using the target attribute

    <script src=../scripts/xxx.js target="blank">

    There are 4 reserved names:

    _top
    _self
    _blank
    _parent


    Or you can supply a named window

    target = window name
    That would be as invalid as pointless.

    Yes, you could step through all of your links and change each of the "href" values, but it would be easier and more accessible to just use absolute values where you can.

  4. #4
    Join Date
    Dec 2003
    Location
    Waardamme, Belgium
    Posts
    121
    Originally posted by Charles
    Yes, you could step through all of your links and change each of the "href" values, but it would be easier and more accessible to just use absolute values where you can. [/B]
    One reason why i can't use absolute addressing is because the same seach script is running on three servers (and one intranet). The relative path points to a resource local to the server sending the reply.
    A second reason is that the page must load in an intranet, where the absolute path is not available.

  5. #5
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,277
    Use absolute URL's for the links, not the scripts.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles