PDA

View Full Version : Go Menu target IFrame



radek
02-08-2006, 01:01 PM
I'm trying to create a GoMenu that heads to a Iframe in the page, but the GoMenu properties don't include the target option. I thought to Edit HTML and add the target with "inside tag", but I don't understand how to adding the text in the right position of the HTML code; BlueVoda always writes before the first > the present in the HTML code.

radek
02-08-2006, 02:36 PM
Is what I'm trying to do!
Here the GoTo Html:
where (**) is the place where I would put the Target
and (*) is the place where BlueVoda->Edit->HTML->Inside Tag-> write the code.
<FORM name="GoMenuForm9" action=""(*)>
<SELECT name="GoMenu" onchange="OnGoMenuForm9Link()" style="width:589px">
<OPTION selected>Seleziona un argomento</OPTION>
<OPTION value="autotelaio.html"(**)>Autotelaio</OPTION>
<OPTION value="scocca.html"(**)>Scocca</OPTION>
<OPTION value="partimobili.html"(**)>Parti Mobili</OPTION>
<OPTION value="finiz-int.html"(**)>Finizioni Interne</OPTION>
<OPTION value="finiz-est.html"(**)>Finizioni Esterne</OPTION>
<OPTION value="stampi.html"(**)>Stampi e Prototipi</OPTION>
<OPTION value="it-soft.html"(**)>Software</OPTION>
<OPTION value="consulenze.html"(**)>Consulenze</OPTION>
</SELECT>
</FORM>
etc... etc...

navaldesign
02-08-2006, 02:40 PM
I'm trying to create a GoMenu that heads to a Iframe in the page, but the GoMenu properties don't include the target option. I thought to Edit HTML and add the target with "inside tag", but I don't understand how to adding the text in the right position of the HTML code; BlueVoda always writes before the first > the present in the HTML code.

You can do it directly when entering the Go menu URLs: instead of typing for the link:

http://www.yoursite.com/pagename.html

type in:

http:/www.yoursite.com/pagename.html" target "famename" and you're done. Attention to the position of the "" and the spaces

radek
02-08-2006, 03:12 PM
Tank you! but it diden't work it open the link like a _self
Is possible that my error is the Go menu and the IFrame must be linked in a Form Layout?

navaldesign
02-08-2006, 04:02 PM
Tank you! but it diden't work it open the link like a _self
Is possible that my error is the Go menu and the IFrame must be linked in a Form Layout?

No, you're right. I tried it but it doesn't work as i thought it should. I'll try it again and if i get results i'll let you know. your other option is to replace the Go menu with image or button links, like in http://www.vodahost.com/vodatalk/bluevoda-tips-tricks-shortcuts/4097-bookmarks-between-pages.html

radek
02-08-2006, 04:33 PM
Tank you! I suggest you to have a look at the javascript incude in Go menu, i think that the problem is there.
See you tomorrow, bye!

navaldesign
02-08-2006, 07:37 PM
Hi radek,


As it is you can't do much. The solution is as follows:


Open your page.
Move your Go menu, at the very top left corner of the page.

Right click on it and go to Object html. Copy the code that will look like:


<FORM name="GoMenuForm2" action="">
<SELECT name="GoMenu" style="width:119px">
<OPTION selected>Select a link</OPTION>
<OPTION value="http://www.yoursite.com/page_in_the_frame1.html>option1</OPTION>
<OPTION value=http://www.yoursite.com/page_in_the_frame2.html>option2</OPTION>
</SELECT>
<INPUT type="button" value="Go" onclick="OnGoMenuForm2Link()">
</FORM>
<SCRIPT language="JavaScript" type="text/javascript">
function OnGoMenuForm2Link()
{
var url = document.GoMenuForm2.GoMenu.options[document.GoMenuForm2.GoMenu.selectedIndex].value +"";
if (url != '')
{
if(parent != self)
{
var doc = self;
while(doc != window.top)
{
doc = doc.parent;
}
if(url.indexOf("://")!=-1)
{
doc.body.window.location.href = url;
}
else
{
window.framename.location.href = url;
}
}
else
{
window.framename.location.href = url;
}
document.GoMenuForm2.GoMenu.selectedIndex=0;
}
}
</SCRIPT>


Replace the blue text (which is originally "top") with the name of your frame, here called "framename".

Insert a HTML box. Double click it to edit it, and paste in the html box the code you have copied.This will create a new Go menu in your page, with the links you have originaly given it, but now it will open the linked page in the iframe.

Delete the original Go menu. You're done!

Please feel free to try it at http://www.navaldesign.info/Tips/goinframe.html

The reason that i told you to move the Go menu in the upper left corner, is that in this way you obtain top and left margins 0. So now you can move the html box anywhere in your page. The whole procedure takes 3 minutes but you obtain a result that cannot be done directly in BV.

If you need help post again.

You gave me a good idea for the nest Tip in the Tips and Tricks section of the forum.

Thanks!

radek
02-09-2006, 11:25 AM
Tank you very much! I have some little problem yet, but it work!

navaldesign
02-09-2006, 11:33 AM
Tank you very much! I have some little problem yet, but it work!

Go to the Tips and Trics section. I've posted there to. There is a small piece ot trick also to make your life easier in positioning the html box in the wright place