Targeting to Iframe trouble

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
Alexxa
Beginner
Beginner
Posts: 8
Joined: Mon Aug 04, 2003 4:09 am

Targeting to Iframe trouble

Post by Alexxa »

It seems so easy to target a link in a version 3 menu to an iframe by adding target=targetname.

Code: Select all

"Stage One","http://ssiups.com/stone.html target=maine"
I certainly did that, and the page did open up in the iframe like i asked, except it said Error in the status bar, and I knew something was wrong.

So I decided to start all over again and go to the famous page that explains how do target a link to an iframe, http://www.milonic.co.uk/menu/menusampl ... ampleid=16, and tried to add that whole javascript thing:

Code: Select all

"Stage One","javascript:openIFrame(\"maine\", \"stone.html\")",,,1
Well, once I added that I added

Code: Select all

function openIFrame(iframeId, winURL){
ifId=gmobj(iFrameId)
ifId.src=winURL
}

to the <head> section of my page stone.html. After I did all that, when I clicked on the link in the menu that said Stage One, nothing opened in my iframe and, once again, I see Error in the status bar.

Is there something I'm doing wrong? Because none of this is working, I need help.
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

make sure in your iframe declaration, you have the id of the iframe set correctly to "maine". Its very important.

Code: Select all

<iframe id="maine" name="maine" src="" height="100" width="100"></iframe>
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Alexxa
Beginner
Beginner
Posts: 8
Joined: Mon Aug 04, 2003 4:09 am

Post by Alexxa »

Yeah I did that, but it STILL gives me the same thing as I said. I STILL get an error in the status bar.
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Duh, this is easier than it looks as I just found out. Put your iframe in your page and make sure its id and name are set. Then in your menu link, put in a target attribute and it will work. I.E

Code: Select all

aI("text=Google;url=http://www.google.com;target=myiframe");
Pretty easy huh? It was staring us right in the face. Give it a try, hope it works for you!
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Man I am really out of it today, this is a second time I have posted a solution for the v5 menu in the v3 forum....i apologize again.
Ok to get to work with v3, use this way of declaring a menu item

Code: Select all

,"Go To Yahoo","http://www.yahoo.com target=myiframe;sourceframe=myiframe; onbordercolor=0000ff;offbordercolor=FFFFFF;",,"Yahoo",0
And just make sure your iframe has an id AND name tag called myiframe. Should work, let me know if it does!
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Alexxa
Beginner
Beginner
Posts: 8
Joined: Mon Aug 04, 2003 4:09 am

Post by Alexxa »

Christ this is really pissing me off. Thanks for your code Hergio, but when I tried to put this tag, when I put my cursor over the link in the menu, it gives me an error in the status bar. And where should I put this:

Code: Select all

<script language=javascript>
function openIFrame(iframeId, winURL){
ifId=gmobj(iFrameId)
ifId.src=winURL
}

</script>
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Get rid of that code, it has nothing to do with the menu anymore...you dont need it. Make your iframe in your page have an ID and a NAME that are defined clearly. And then in your menu declaration, right after you type out your URL you put in the

target=myiframe;sourceframe=myiframe;

as you can see i have an iframe in my page like so:

Code: Select all

<iframe src="http://www.google.com" width="500" height="200" id="myiframe" name="myiframe"></iframe>

And I have a menu declaration like so:

Code: Select all

,"Apple in Iframe","http://www.apple.com target=myiframe;sourceframe=myiframe;",,,0
This exactly worked for me.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Alexxa
Beginner
Beginner
Posts: 8
Joined: Mon Aug 04, 2003 4:09 am

Post by Alexxa »

I did that exact thing, and it works, it opens up in the iframe like it's supposed to, but it says in the status bar Error on Page or Done, but with errors on page. As soon as I put my cursor on the link in the menu, the error begins. If you want to see my menu_array.js, it can be found here: http://flirt-with-suicide.net/poison/menu_array.js
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

I checked your menu_array file and everything looked good. But then I navigated to your mmenu.js file and I think I found the problem. You are using version 3.3.19 of the old menu, when the most current (and final) version is 3.5.something. I think its erroring because you are using the old version and I was using the new version. Go to the menu homepage, view the source and download the mmenu file, andy will be using the most current on his pages. That should clear up the problem.

BTW, I noticed the URL to your site being kinda fishy. I hope you're not using this menu for things that pertain to the topic described in your URL, because if so, that your choice, but I will not help you any longer.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Alexxa
Beginner
Beginner
Posts: 8
Joined: Mon Aug 04, 2003 4:09 am

Post by Alexxa »

I did change my mmenu.js file to the one on the menu homepage, and it FINALLY worked. I want to thank you, Hergio, for helping me through my stupidity, I couldn't have done it without you :D

And to clear things up on my url, if you must know, it came from a Korn lyric that is very meaningful to me and, in no way, promotes suicide. It would really be great if people in this world wouldn't be so narrow-minded and wouldn't take things so litterally, as this url is a mere sarcasm. It's sad that you think you know my story and you think you know where I'm coming from to directly assume that I was promoting suicide. My website could have been a site about helping people with suicide or maybe it doesn't even pertain to suicide but no, you had to take the negative road and threaten to cease helping me with my problems. All in all, the way I use my menu is none of your business and for future reference, open up your mind, it would do you some good.
User avatar
fredlongworthhighschool
Mega Advanced
Mega Advanced
Posts: 362
Joined: Fri Jun 27, 2003 11:34 am
Location: Manchester, England.
Contact:

Post by fredlongworthhighschool »

Your URL is blocked by our company filters, so I can't even see what its about.
Andy Davis
Web Designer & Smartboard Manager

Fred Longworth High School, Manchester, England.
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Alexxa, I was not trying to insult you because, I agree, I did not know exactly what you're site was about. I even tried to investigate by navigating around it to give you the benefit of the doubt, but found nothing. And I wasn't telling you that I was going to stop helping you now, I was just saying that if it was about helping people to commit suicide, I wouldn't feel right helping someone get a site up and running to help people do that. Now, you don't have to believe anything I say, but I do have an open mind about things, and I try to look at all sides of a story and rarely ever get a temper, and I could have bashed your url for being laden with suicide terms. But didnt, thats that open-mind thing working there. Also, as its probably very evident, I don't listen to Korn so I did not know of the lyric. But if you take the term 'flirt with suicide'...open minded or not, it sounds like someone is flirting with killing themselves, but ok, I guess it could be a site for something else, like as you mentioned, helping someone who is contemplating it to not do it. But then you see a directory called poison...umm that doesn't really lend itself to that 'helping someone' idea. What it actually looks like is a url regarding suicide, but now a directory devoted to the poison aspect of suicide, and people use poison so its not exactly far fetched for me to have thought what I did. Please understand, if the url has nothing to do with helping someone commit suicide, thats great, and thats why I didn't bash you from the start because I was not sure. I told you, it looked "kinda fishy" and that was "your choice", not that you were a anti-life, anti-social, death loving atheist. Because thats what someone with a closed-mind might have done.
It's sad that you think you know my story and you think you know where I'm coming from to directly assume that I was promoting suicide
And for the record, no, I dont think I know your story or where you are coming from...I actually never said that nor inferred it. I explained where I was coming from above and hinted to you that if that was your story and that was where you were coming from, then that was your choice (meaning I am not going to bash you or preach to you), and if not, lets move on. What I dont like is people in this world putting words in my mouth and telling me what I am thinking. :x

I'd rather not take this any farther. I would love to continue to help you with your questions and problems pertaining to this menu. Thats the reason we're all here anyways.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Alexxa
Beginner
Beginner
Posts: 8
Joined: Mon Aug 04, 2003 4:09 am

Post by Alexxa »

To me, they key thing here is not to take everything so litterally.
But then you see a directory called poison...umm that doesn't really lend itself to that 'helping someone' idea. What it actually looks like is a url regarding suicide, but now a directory devoted to the poison aspect of suicide, and people use poison so its not exactly far fetched for me to have thought what I did.
It's actually funny how you even present the idea that having a directory called poison could be some kind of threat, and agian took it litterally. I have a friend whose url is kittenx.com. Does this mean now that we have to be all litteral and assume that her site is about kittens? And I, in no way, put any words in your mouth.

Oh, and for your information Hergio and fredlongworthhighschool, the site that I am using this menu on is not even my flirt-with-suicide.net site, but I guess that idea didn't even pop up in your heads, and you just decided, once again, to assume you know what you're talking about.

People are so funny. Thank you for your time, I appreciated your help.
User avatar
fredlongworthhighschool
Mega Advanced
Mega Advanced
Posts: 362
Joined: Fri Jun 27, 2003 11:34 am
Location: Manchester, England.
Contact:

Post by fredlongworthhighschool »

Alexxa wrote:If you want to see my menu_array.js, it can be found here: http://flirt-with-suicide.net/poison/menu_array.js
Alexxa wrote:Oh, and for your information Hergio and fredlongworthhighschool, the site that I am using this menu on is not even my flirt-with-suicide.net site, but I guess that idea didn't even pop up in your heads, and you just decided, once again, to assume you know what you're talking about.

Bit of a contradiction that. If you have your JS files on this URL, then it seems pretty clear that your menu would be there.

I don't have a problem with your URL so I don't know why you're having a go at me (BTW my name is Andy if you'd looked at the end of my posts), I was just pointing out that the filters on our school web system prevent me from even looking at your site so I cannot help or even make an opinion of the content.

And looking at my last post, I didn't even make any comment. By all means have a go at me if I have made any false assumptions. But I haven't.
Andy Davis
Web Designer & Smartboard Manager

Fred Longworth High School, Manchester, England.
Alexxa
Beginner
Beginner
Posts: 8
Joined: Mon Aug 04, 2003 4:09 am

Post by Alexxa »

Bit of a contradiction that. If you have your JS files on this URL, then it seems pretty clear that your menu would be there.
Wow, just because I have that file up there makes you absolutely certain that I'm using it on this site? Well, you couldn't even THINK for one second to wonder that I was just testing this file out. And I don't have to explain myself to you. I know where I'm putting my *----*.
User avatar
fredlongworthhighschool
Mega Advanced
Mega Advanced
Posts: 362
Joined: Fri Jun 27, 2003 11:34 am
Location: Manchester, England.
Contact:

Post by fredlongworthhighschool »

That still doesn't explain or excuse the attitude you've taken to the people who have tried to help you, one of which didn't even comment on the nature of your site from the very beginning.
Andy Davis
Web Designer & Smartboard Manager

Fred Longworth High School, Manchester, England.
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Alright alright, this is ridiculous. Alexxa, nobody was trying to insult you. You have to understand that when someone looks at something, they can't always say, 'well maybe this isn't the real story'. 90% of the time in life you have to (at least to start) take things at face value. Thats all you have to go on. If I went around my whole life saying, 'well maybe this isn't exactly what it looks like', I would drive myself crazy. Understand people will make mistakes, and assumptions; its human nature. But there are alot worse (and mean) assumptions one can make than saying, hey you might be using the menu on this url because you're posting to it. If you'll notice the people on here are to help you, so we'd appreciate alittle respect. If we insulted you, we apologize, but it wasn't intentional. If you want to go around and bite the heads off of people who accidently step on your toes, then I'm sorry, but you're not going to go very far. Best of luck with the menu, whatever you are going to use it for (note: no assumptions here).
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Alexxa
Beginner
Beginner
Posts: 8
Joined: Mon Aug 04, 2003 4:09 am

Post by Alexxa »

I am very happy with the menu and I appreciate all of your help.

Oh, and one more thing, I'm not human.
Post Reply