How to open all links in a <script> tag in new windows?

Discussion in 'HTML & Website Design' started by d29, Aug 30, 2006.

  1. #1
    I've got an iframe on a site and inside the iframe I've got a page with a simple Expedia car rental form. The code for the form is something like this

    
    <script language="JavaScript" src="bfast.com" >
    
    </script>
    
    Code (markup):
    As you can see, the form is hard coded inside JavaScript and I cannot set links to open in new windows or at least in the parent window manually.

    Instead, when one clicks a link or submits the form, the follow-up page opens inside that tiny iframe (~200x300 in pixels) which turns the usefullness of said form close to zero.

    Expedia offers no iframes code which is quite silly.

    I want said links to open in the parent window or in new windows but I can't seem to manage to override those settings. How do I do this?

    Thanks in advance,
    David
     
    d29, Aug 30, 2006 IP
  2. jeremyweber

    jeremyweber Peon

    Messages:
    112
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Any chance you could link to the page that displays the problem or is an example of the problem?
     
    jeremyweber, Aug 30, 2006 IP
  3. d29

    d29 Active Member

    Messages:
    89
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    93
    #3
    I've replicated for you. Here it is:
    http://www.ambrossion.com/issue.php

    Just search or click on a link from that form and you'll see how it loads.

    I can't enlarge the width and height of the iframe unfortunately. I'd merely like for the following page to open in either a new window or the parent window.

    Thanks in advance,
    David
     
    d29, Aug 30, 2006 IP
  4. jeremyweber

    jeremyweber Peon

    Messages:
    112
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Dont know if this helps but....

    testpage -> carrental.html ->

    <script language="JavaScript" src="http://service.bfast.com/bfast/script/xxxx">

    ->

    var bfsiteid_26917872_dsf_1carwiz = 'xxxx';
    document.write('<script language="JavaScript" src="http://www.expedia.com/daily/storefronts/car.js?"></script>');

    ->

    http://www.expedia.com/daily/storefronts/car.js

    Additionally, i took a quick look at a couple of things but couldnt find anything to help you directly. If I were you, I would google the following topics

    - updating parent document via an iframe.
    - forcing document.write to write to parent doc.


    Hope this helps...
     
    jeremyweber, Aug 30, 2006 IP
  5. d29

    d29 Active Member

    Messages:
    89
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    93
    #5
    Thanks for trying to help.

    Unfortunately, I don't get that from Expedia. I just get a <script src=""></script> code and that's all. I'm not allowed to fuss around with their precious script. It's ridiculous. They could've at least offered iframe code as some other affiliates do.

    I've tried tens of various queries on this theme and couldn't find an answer to what looks like a petty problem. I'll keep trying though.

    Thanks,
    David
     
    d29, Aug 30, 2006 IP
  6. jeremyweber

    jeremyweber Peon

    Messages:
    112
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Yeah, I would be interested and seeing how other implemented a solution...
     
    jeremyweber, Aug 30, 2006 IP
  7. AMysticWeb

    AMysticWeb Guest

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Looks like your code is coming from BeFree, in which case you can't control the window options, since what is appearing is not of your creation. If this page were a page in your site which appears in the iFrame then you could code the link on that page to a new window.

    If you were to use an image or text link instead of the iFrame, then of course you could direct the window.

    As you say, you aren't supposed to alter the code. I have posted hundreds of affiliate links in the past and can tell you from experience that changing the code, even to the point of substituting a text link instead of an image (without the appropriate code change) can effect your income or lack of from the link.

    There may be a way to do this, but you risk losing any income from the link, defreating the purpose.
     
    AMysticWeb, Aug 30, 2006 IP
  8. d29

    d29 Active Member

    Messages:
    89
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    93
    #8
    Indeed.

    Anyone else please? I must've used 30 queries to find an answer for this and all I find is forum threads with questions similar to mine.
     
    d29, Aug 31, 2006 IP