...

View Full Version : Overly complex but neccessary



thirdpoet
07-06-2004, 08:29 PM
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

Willy Duitt
07-06-2004, 08:48 PM
Try removing this: myWin = window.open(link ,'cbe');

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

glenngv
07-07-2004, 09:31 AM
Or:

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

lordofthesword8
07-07-2004, 11:54 AM
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

thirdpoet
07-07-2004, 01:44 PM
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

thirdpoet
07-07-2004, 01:47 PM
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

Willy Duitt
07-07-2004, 03:45 PM
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

lordofthesword8
07-08-2004, 01:48 PM
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

thirdpoet
07-12-2004, 08:15 PM
Well, they finally saw the light and decided not to use frames. Thank you everyone for your comments and suggestions.

-3rdpoet



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum