PDA

View Full Version : Php includes help (is this possible to do)


Cleo
02-27-2005, 09:37 AM
I have a drop down menu includes and I would like to use it in more then one frame of a site. The problem is that I need to define what frame the drop down menu opens in.

Right now I have this.
select style="color: black; font-size: 10pt; background-color: #a7b9ff;" name="menu1" onchange="if(this.options[this.selectedIndex].value!=''){window.open(this.options[this.selectedIndex].value,'_self')}">
<option value="URL"</option>

Is the a way to make this "value,'_self'" a variable so that when it is pulled into one page it will be value,'_main' and when it is pulled into the other frame it will be value,'_self'?

swedguy
02-27-2005, 09:42 AM
Hmm, I don't think I follow you completely. Do you have a live example?

Cleo
02-27-2005, 09:52 AM
Not without much hassle as it is inside of Angel's member's area.

Basically I have an includes named "members-drop-down.txt"

This includes is pulled in a page named "main.html" that is part of a frame so its target is set to self.

I want to use this includes into another page of the frame set so I need to change its target depending on which page of the frame set it is pulled into.

So instead of value,'_self' it needs to be value,'VARIABLE' and the variable is self if pulled into the main page or main if pulled into the left page of the frame set.

swedguy
02-27-2005, 10:13 AM
ahhh, now I get it. Sounds like it will always target _main.
_self is the same as _main when it's pulled into the main.html. Just have it always target _main.

Cleo
02-27-2005, 10:21 AM
|banghead|
Don't I feel dumb. |banghead|

Yeah just make the target main and problem solved LOL

swedguy
02-27-2005, 10:24 AM
It happens us all every now and then :D