Closed Thread Icon

Preserved Topic: Frames question du jour (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=20451" title="Pages that link to Preserved Topic: Frames question du jour (Page 1 of 1)" rel="nofollow" >Preserved Topic: Frames question du jour <span class="small">(Page 1 of 1)</span>\

 
wcr one
Paranoid (IV) Inmate

From: seattle
Insane since: Mar 2001

posted posted 02-27-2002 20:07

Hey,

continuing the rash of frames questions. I have a drill down set up where the left frame is a list of matches returned from a query (fish species meeting certain criteria) and the right frame is the drill down frame for more info about the selected fish. on the right frame, because there is so much info, I have a menu that allows the user to look at several different ascpects of the fish selected-illustrations, life history, meristics, distribution, etc.

my problem is when the user wants to look at another species, I want the new species info to come up on the same menu option as it was on for the other species. this allows the user to easily compare info from two (or more) species with just one click, instead of click the species to go to default page, then pick menu option.

I know I need to pass the framename & option file name to the new species, but not sure how, and as usual, my orielly books are at home (unless I need them there, then they are always at work).

the bit of code in the drill down looks like this:
<cfif qrySelectedSpecies.GSID is not "">
<div class=text>Taxa</div>
<cfoutput query = "qrySelectedSpecies">
<div>
<A HREF="LHDataIll.cfm?GSID=#qrySelectedSpecies.GSID#" target="SearchLH">
<b>#qrySelectedSpecies.Genus# #qrySelectedSpecies.Species#</b></a>
</div>
</cfoutput>
<cfelse>

with LHDataIll.cfm being the currently defaulted page. it is in ColdFusion, but that should not matter. I can almost see how to do this, but can't get it to work.

as usual, any help is appreciated.

[This message has been edited by wcr one (edited 02-27-2002).]

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 02-27-2002 21:17

wcr one: You might have to explain the problem in a different way (at least for me!!). Do you mean that if you had fish 1's summer breeding habits - you'd like to have links to fish2, 3, 4, etcs available just one click away? Or do you mean in the drilldown at the side you have everything in the same place? Neither of those seem right to me - although if I was going to guess it would be closer to the former. If so that looks fine but I think I've misunderstood something critical in your explanantion. Sorry (potential prize for my worst answer yet!! And there have been some stinkers).

Emps

wcr one
Paranoid (IV) Inmate

From: seattle
Insane since: Mar 2001

posted posted 02-27-2002 22:25

okee dokee emps, here is a bit of a halfassed idea of what it looks like

code:
FISH1         Menu1  Menu2  MENU3  Menu4
fish2
fish3 MENU3infoinfoinfoinfoinfoinfo
fish4 infoinfoinfoinfoinfoinfoinfoinfo
infoinfoinfoinfoinfoinfoinfoinfo
infoinfoinfoinfoinfoinfoinfoinfo
infoinfoinfoinfoinfoinfoinfoinfo


so in this case fish names in left frame, drilldown info in right frame including menu for different info about fish selected. FISH1 is selected and MENU3 item data being displayed.

now, when I click on fish2 (or fish3 or fish4), I want the menu3 data for fish2 to appear. if I was on menu4, then that is the data i would want displayed for the newly selected fish.

is that a bit less opaque? hope so.



[This message has been edited by wcr one (edited 02-28-2002).]

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 02-28-2002 02:08

wcr one: Stop editing - I understand now!!

The problem is that the left hand side frame doesn't change to reflect the contents of the main frame so the link remains static. I would probably do something like:

1. Set a cookie to show which menu is being shown and then I'd go in the page being loaded into the main frame I'd do something like:

if cookie=menu 1 {

}
if cookie=menu 2 {

}

then:

if fish=1 {

}
ETC

You'd need to detect if a link has come in directly from the main frame links before the above does its work and if it has set a cookie for the right menu (overwriting the pervious one).

or:

2. Use JavaScript at the start of each menu page to load a new page in the left frame so the link is now say fish1.fcm?menu=1.

I'd probably go for option one and try to keep everything serverside (so you never have to worry about the JavaScript). I don't know much about ColdFusion but it would be doable in PHP. I'm not sure if I explained that well and it is a bit of a back of the envelope solution so there might be flaws.

Emps

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 02-28-2002 02:22

You know, you can delete the old "this message has been edited by" things each time you edit. =)

wcr one
Paranoid (IV) Inmate

From: seattle
Insane since: Mar 2001

posted posted 02-28-2002 18:35

hey emps,

that is what ifigured, just having troubles getting it to work. but it is good to know I am wobbling down the right path.

as for all those edit messages, mr. slime, sure it is extrememly obvious, you know, once somebody actually mentioned it.

and for my next trick I will attempt to pull a head out of my ass. ta-da!

thanks

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 02-28-2002 19:59

wcr one: Its is definitely possible (I'd also add that sessions might work well for you here) - it'll just take a bit of planning to get everything in the right order (pos. a flowchart might work for you!!). As I said I don't know ColdFusion but I suspect the main problem will be in the structure rather than the implementation so we should be able to kick this one around a bit until it takes shape.

Anyway it sounds like an interesting project and I know I'm looking forward to seeing what you do here!!

Emps

wcr one
Paranoid (IV) Inmate

From: seattle
Insane since: Mar 2001

posted posted 02-28-2002 22:10

emps:

thanks a bunch for your help. I was wondering about setting a variable on the right frame that is the form name (maybe set using OnLoad?) for the menu option that is current, then when this bit of code is used:

<A HREF="varname?GSID=#qrySelectedSpecies.GSID#" target="SearchLH">
<b>#qrySelectedSpecies.Genus# #qrySelectedSpecies.Species#</b></a>

and the varname is the page name. does that make sense? and if it does, would it actually work? My problem has been passing the varname/cookie across frames. would it be a session variable? also, I would have to set the variable on the search page, so it comes in to the default page of illustrations. anyways, let me know if you think this would work.

thanks again for all your time and effort, and not just when you have helped me, but all the other folks you have spent so much time helping.

bill

wcr one
Paranoid (IV) Inmate

From: seattle
Insane since: Mar 2001

posted posted 02-28-2002 23:12

Hey, shouldn't I be able to identify the name of the file in the frame? i mean like with frame.framename.filename (or some such syntax)? isn't there a way to do this, and if I can, could I just pass this along as my filename?

<A HREF="filename?GSID=#qrySelectedSpecies.GSID#" target="SearchLH">
<b>#qrySelectedSpecies.Genus# #qrySelectedSpecies.Species#</b></a>

argh. this seems like it should be quite easy. why am a so stupid? maybe my mom drank when she was pregnant - maybe I can use that as an excuse.

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 03-01-2002 14:29

wcr one: Cool - I'm just glad people find it helpful (and I enjoy questions like this as they do make one have to think hard about different solutions). I'm sure there are plenty of solutions to this (and various little additions you can make to make things more usable. I'll trim my two solutions down a bit as there may be various ways of doing them so:

1. Keep the left frame stable (links through to just the fish section) and use a way to detect which menu you are in (cookies, sessions, etc.). So the links in the left frame would always be just to e.g. (using PHPishness) index.php?fish=1 and all the hard work would go on on the index page where you would check to see if a cookie, session, etc. was set for a menu state and then load in the correct information for that specific fish.

2. Reload the left frame to reflect the menu chosen in the main frame. So when menu 1 is loaded the left frame is updated to add the menu to the link so the links would initially read e.g. (using PHPishness again) index.php?fish=1 and they would be updated to read index.php?fish=1&menu=1.

I suspect the first option might involve a little more work but it would be the one I'd go for as it avoids the JavaScripting to reload the page butit does invovle cookies and sessions and you will have to make sure that it will work OK for people who don't accept cookies (pass the session ID via the URL?).

Hope that helps clarify the way I was thinking although there must be many more approaches. I don't know about the features available in ColdFusion so there might be other goodies avaialble to you (or something like sessions might not be so easy as it is in PHP).

Good luck,

Emps

« BackwardsOnwards »

Show Forum Drop Down Menu