PDA

View Full Version : target-variable in coolframemenu3


zwene
14.05.2001, 14:04
Why opens a line such this

oCMenu.makeMenu('top0','','Home','menue_01_home.ht ml','frmMenu','','','','','','','blue')

the page in the Frame frmTippext, which is my main frame? Is this a bug or make I something wrong?

If you don't know, what I mean, look at this [url:35l2lkt65n]http://www.hoerspielzeit.de/cfm3/index.html[/url:35l2lkt65n]

If you mouseover one point of the menu, you can see a submenu as a tipptext in the frame over the menu. Clicking on a menupoint like "Home" loads the menue_01_home.html not in the frame frmMenu - it opens in the frame frmTipptext. :(

Xanth
14.05.2001, 14:25
Are you sure you've got the frames named correctly?

function Mike(name, mail) {
*****this.name = "Xanth";
*****this.mail = [url:ga9rzq2j6d]belgedin@earthlink.net[/url:ga9rzq2j6d];
*****return this;
}

zwene
14.05.2001, 14:37
<BLOCKQUOTE id=quote><font size=1 face="Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Are you sure you've got the frames named correctly?<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Arial, Helvetica" size=2 id=quote>

Yes, I'm very sure. ;)

Shane
14.05.2001, 15:20
Zwene, I looked at your link from the other site. Off-hand, I would suggest making sure that the frame ID is not the same as another frame's name. I am not sure how the target affects it, I have never used a target in the frame tag. If I get some more time, I can look at it further.


ShAnE

zwene
14.05.2001, 15:36
<BLOCKQUOTE id=quote><font size=1 face="Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Zwene, I looked at your link from the other site. Off-hand, I would suggest making sure that the frame ID is not the same as another frame's name.<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Arial, Helvetica" size=2 id=quote>

I test it by renaming the IDs - the same. :(

<BLOCKQUOTE id=quote><font size=1 face="Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> I am not sure how the target affects it, I have never used a target in the frame tag. If I get some more time, I can look at it further.<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Arial, Helvetica" size=2 id=quote>

Sure, that the target-function of the code works ...?

Xanth
14.05.2001, 15:41
<font color=teal><frame src="menue_01_home.html" name="frmMenu" id="frmMain" frameborder="0" scrolling="no" marginwidth="5" marginheight="5" target="frmMain" noresize>
<frame name="frmMain" src="frame_start_seite.html" target="_self" scrolling="auto"></font id=teal>

You seem to have na id="frmMain" in what I'm guessing is the menu frame I'm not sure if that's what's causing the problem thoughI'm gonna go take another look at your frameset

function Mike(name, mail) {
*****this.name = "Xanth";
*****this.mail = [url:fgrtiaj8ip]belgedin@earthlink.net[/url:fgrtiaj8ip];
*****return this;
}

Shane
14.05.2001, 16:19
Yeah, I just double checked, the target is working for me. Do you have the latest version of the coolmenu3.js file?


ShAnE

zwene
14.05.2001, 16:28
<BLOCKQUOTE id=quote><font size=1 face="Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Yeah, I just double checked, the target is working for me. Do you have the latest version of the coolmenu3.js file?<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Arial, Helvetica" size=2 id=quote>

Yes, I have ... :( Hmmm ... someone here tested the target-variable, too?

Xanth
14.05.2001, 16:34
are the target="" attributes in the framesets needed? don't suppose that could be messing anything up??

function Mike(name, mail) {
*****this.name = "Xanth";
*****this.mail = [url:b10a5wju1x]belgedin@earthlink.net[/url:b10a5wju1x];
*****return this;
}

Shane
14.05.2001, 16:34
Wait a minute....I just tried it using a variable...doesn't seem to work right now...
Let me play with it some more.

Guess I didn't check it good enough the first time :)


ShAnE

Shane
14.05.2001, 16:43
It seems to me that even if I specify the frame target it still opens into the frmMain. Unless someone beats me to an answer, i will attempt to figure out why it isn't working.


ShAnE

zwene
14.05.2001, 17:06
<BLOCKQUOTE id=quote><font size=1 face="Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
It seems to me that even if I specify the frame target it still opens into the frmMain. Unless someone beats me to an answer, i will attempt to figure out why it isn't working.<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Arial, Helvetica" size=2 id=quote>

Thank you ... and I thought I made something wrong. :)

Edited by - zwene on 05/14/2001 16:10:54

Shane
14.05.2001, 17:30
Well, this is the code in the js file that deals with where to direct the link....

<pre id=code><font face=courier size=2 id=code>
function cm_go(name){
obj=this.m[name]; url=obj.lnk; target=obj.target; fc=obj.mclick
if(url){
if(this.useframes&&!coolFrameError) loc=this.win.location.href; else loc=location.href
if(fc) eval(fc); url=this.checkFolder(loc.toString(),url)
this.isover=0; this.hideSubs(1,0,1); if(target=="_blank") window.open(url)
else if(target=="_top" || target=="window") top.location.href=url
else this.win.location.href=url
}else if(fc) eval(fc)
}
</font id=code></pre id=code>

If you change
this.win.location.href=url
to
parent.yourframename.location.href=url
it will do it correctly ( atleast in ie ). But I can't seem to figure out how to use the obj.target that Thomas has put in the menu. ( Or if that is even the problem ).

Thomas, if you are reading this...? what are we doing wrong?

ShAnE

zwene
14.05.2001, 17:55
<BLOCKQUOTE id=quote><font size=1 face="Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
If you change
this.win.location.href=url
to
parent.yourframename.location.href=url
it will do it correctly ( atleast in ie ).<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Arial, Helvetica" size=2 id=quote>

Thank you a lot, it works fine after this changing. <img src=icon_smile_cool.gif border=0 align=middle>

Edited by - zwene on 05/14/2001 16:56:41

Shane
14.05.2001, 18:19
Zwene, your welcome.
actually that is just a little cheap way to get it to work, I am still trying to figure out how to do it correctly. By changing what you did, I think that will be the only frame any of them go to ( unless they are _top, _blank or window ). So if you try and specify another frame with a different name, it won't work.


ShAnE

Edited by - Shane on 05/14/2001 17:21:44

zwene
14.05.2001, 18:48
<BLOCKQUOTE id=quote><font size=1 face="Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Zwene, your welcome.
actually that is just a little cheap way to get it to work, I am still trying to figure out how to do it correctly. By changing what you did, I think that will be the only frame any of them go to ( unless they are _top, _blank or window ). So if you try and specify another frame with a different name, it won't work.<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Arial, Helvetica" size=2 id=quote>

I know that, but in the moment I don't need no other target. But I want to know why the target-variable don't work, too. :)

bratta
15.05.2001, 05:34
I will check this it out later today and make a fix for it. I'll let you know what the problem was.

-Thomas Brattli-
http://www.bratta.com/
http://www.dhtmlcentral.com/

Shane
16.05.2001, 11:48
Hey Zwene, Thomas put up a new version of the js file. The target variable works now.

ShAnE

Shane
16.05.2001, 11:53
Hey Thomas, thanks for the fix, if you have time, could you explain for me what you did?

<pre id=code><font face=courier size=2 id=code>function cm_go(name){
obj=this.m[name]; url=obj.lnk; target=obj.target; fc=obj.mclick
if(url){
if(this.useframes&&!coolFrameError) loc=this.win.location.href; else loc=location.href
if(fc) eval(fc); url=this.checkFolder(loc.toString(),url); this.isover=0;
if(String(target)=="undefined" || target=="" || target==0 || target=="_self"){
this.hideSubs(1,0,1); this.win.location.href=url
}else if(target=="_blank") window.open(url)
else if(target=="_top" || target=="window") top.location.href=url
else if(top[target]) top[target].location.href=url
else{fr=findFrame(target); if(fr) fr.location.href=url}
}else if(fc) eval(fc)
</font id=code></pre id=code>

thanks,

ShAnE