Results 1 to 4 of 4

Thread: Interaction btw Open offsite links in new window & Tab content script

  1. #1
    Join Date
    Jun 2005
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Interaction btw Open offsite links in new window & Tab content script

    1) Script Title:
    Open offsite links in new window

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...newwindow2.htm

    3) Describe problem:
    Well, it's not exactly a problem, but I suppose I would like to know if this is working as designed.

    The only instruction I could find about using the script was to put it in the body of the page. I'm using the tab content script for most of the content on the page.
    If I put the OOLINW script at the top of the body - it doesn't work
    If I put the OOLINW script at the bottom of the body - it doesn't work
    If I put the OOLINW script inside one of the tab content divs - it works perfectly, and it works in all tab content "pages".

    Any clue why this is happening? It's not super important because the script seems to be working fine, but I was wondering why this behavior was occuring, and giving a heads up you might want to add this behavior as a hint on the description page.

    Thanks,

    Thomas
    www.flyingscool.com

    For the example, go to http://www.flyingscool.com/UsingMSFS.htm

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,167
    Thanks
    44
    Thanked 3,240 Times in 3,201 Posts
    Blog Entries
    12

    Default

    It could be difficult to track this down and in fact, the links on your page don't open new windows in Opera or FF, only IE. Rather than continue to puzzle over such matters which, even if resolved, will make your links' targets dependent upon javascript, simply add the appropriate target attribute to each link on your page:

    HTML Code:
    <a href="offsite.htm" target="_blank">Link Text</a>
    To save coding, you can use the base target, if most of the links should be targeted, place this in the head:

    HTML Code:
    <base target="_blank">
    Once you do that, all links on the page will open in new windows. To get some to open in the same window, use the target attribute for those links:

    HTML Code:
    <a href="onsite.htm" target="_self">Link Text</a>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jun 2005
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hmm... That's interesting. I don't have Opera, but I did test it on Firefox and it seems to work fine on my system.

    Are you sure it doesn't work for you? The only page I have used the script on is http://www.flyingscool.com/UsingMSFS.htm.

    I was hoping the script would work because there are sooo many links on this page managing all the target= is a nightmare.

    Thanks,

    Thomas

  4. #4
    Join Date
    Jun 2005
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    As a further note: I had somebody else test the page as well. At first, it didn't work for him, but after the first try, it did, and kept on working.

    Then, I opened a FF window, and it didn't work for me on my first click (it had been working fine for me). I opened another window, and it worked for me, and it has worked since no matter what I do.

    It makes management of my links so much easier, I think I'll stick with it. Opera users are a very small percentage of my hits.

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
  •