Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New to the CF scene
    Join Date
    Jul 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Overly complex but neccessary

    I am working on a page for a client. We are using some script provided by a national service website. Now if I had my way I would leave the script the way it is and just have it open a new window as it is doing. But the client insists that they want it opening within the current format. So I a left with the annoying and blatent route of frames. This script is not made for frames. The site it sends data to and links from does not do frames. So I have to make this thing work with frames. This has not been a happy day for me or my boss since he cannot figure it out either.

    I am going to boil it down the very basic content(there is more but not needed to explain problem).


    Here is the link at the end of the form used to gather the data.
    <a href="javascript:void(0)" onclick="popupCBE()">

    Here is the function used to setup and send out the data and pull up the results.
    function popupCBE() {
    // all are optional
    var depart_dt = getDepart();
    var return_dt = getReturn();
    var dest = document.cbe.destination_city_code.value;
    var gw = document.cbe.departure_city_code.value;
    var adults = getSelectCBE(document.cbe.adults);
    var children = getSelectCBE(document.cbe.children);

    var link = "ommitted url";
    link = link + "&Adults=" + adults;
    link = link + "&Children=" + children;
    if (dest!="") link = link + "&Destination=" + dest;
    if (gw!="") link = link + "&Gateway=" + gw;
    if (depart_dt!="") link = link + "&Depart=" + depart_dt;
    if (return_dt!="") link = link + "&Return=" + return_dt;
    myWin = window.open(link ,'cbe');

    }

    So my boss and I believe the key is the final line "myWin =...." but have tried many different iterations based on various methods we have researched. The frame we are trying to link to is called "lowFrame". I will be interested to see how very easily someone will solve this after the brain busting that has gone on around the office.

    -thirdpoet

  • #2
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try removing this: myWin = window.open(link ,'cbe');

    Replacing with: document.frames['lowFrame'].src = link;

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    Or:

    myWin = window.open(link ,'lowFrame');

  • #4
    New Coder
    Join Date
    Jun 2004
    Location
    Coventry, UK
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Do you really need it in a frame?

    I personally try to avoid frames, as they are overly complicated.

    Would it be easier to just change the current window to the desired target?

    Anyway I see why you struggled as it seems a very complicated code, especially if this is not all of it!

    LOTS8

  • #5
    New to the CF scene
    Join Date
    Jul 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh I am pushing at every opportunity to scrap the Frames, but our clients have particular desires and to hell with what is functional or even visually appealing. When you work for others sometimes you gotta lower the bar, sadly.

    -thirdpoet

  • #6
    New to the CF scene
    Join Date
    Jul 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Tried Willy's solution, didn't pan out. I have tried subbing "lowFrame" for "cbe" and it just dosen't seem to work. I see this as a sign, a omen from the gods of web design that our frames are an affront to the un-natural order of the web.

    -3rdpoet

  • #7
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If none of these suggestions worked and you are still having problems, I would guess that the national service website you are trying to retrieve this data from is using a breakout of frames script to specifically prevent you from loading their information into your frame......

    .....Willy

  • #8
    New Coder
    Join Date
    Jun 2004
    Location
    Coventry, UK
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Good Idea

    Quote Originally Posted by Willy Duitt
    If none of these suggestions worked and you are still having problems, I would guess that the national service website you are trying to retrieve this data from is using a breakout of frames script to specifically prevent you from loading their information into your frame......

    .....Willy
    Great Idea I hadnt though of that. Try getting in touch with them, and ask them if the problem is at theirend.

    LOTS8

  • #9
    New to the CF scene
    Join Date
    Jul 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, they finally saw the light and decided not to use frames. Thank you everyone for your comments and suggestions.

    -3rdpoet


  •  

    Posting Permissions

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