[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Webmasterplein.net • Toon onderwerp - Dropdown menu linken met iframe
Pagina 1 van 1

Dropdown menu linken met iframe

BerichtGeplaatst: 25 jun 2005 18:57
door Anonymous
Hey,

Ik ben bezig met een drop down menu (is te vinden op http://www.habbocity.nl/index3.html) maar de pagina's moeten openen in het iframe (genaamd "main").

normaal doe je dat door target="main" neer te zette nmaar hierbij werkt dat niet.

Hier de code die ik gebruik voor mijn menu:

------------------------------------------------

<head>
<script language="Javascript"><!--

function goThere(form){
var linkList=form.selectThis.selectedIndex
if(!linkList==""){window.location.href=form.selectThis.options[linkList].value;}
}
//--></script>
</head>


<body>
<div style="position: absolute; top: 188; left: 94;">
<form name="dropMenu">
<select name="selectThis" onChange="goThere(this.form);" style="border: 1px solid #000000; background-color: #A5C67B">
<option selected value="">Habbocity
<option value="">-----------------
<option value="http://www.habbocity.nl/magazine.htm">HC Magazine</option>
<option value="http://www.habbocity.nl/team.html">Team
<option value="http://www.habbocity.nl/forum.html">Forum
<option value="http://www.habbocity.nl/contact.php">Contact
<option value="http://www.habbocity.nl/sollicitatie.php">Sollicitatie
</select>
</form>
</div>
</body>

------------------------------------------------

Wat moet ik nou doen om te zorgen dat de pagina's in het iframe "main" worden geopend?

groetjes,
justin

BerichtGeplaatst: 25 jun 2005 19:33
door Anthony
[syntax="javascript"]window.location.href=form.selectThis.options[linkList].value;}[/syntax]

[syntax="javascript"]main.location.href=form.selectThis.options[linkList].value;}[/syntax]

Dat zou moeten volstaan Smile

BerichtGeplaatst: 25 jun 2005 19:51
door Anonymous
Jep dat klopt! bedankt dit werkt Smile

Nu dit werkt heb ik nog een vraag:
Wanneer je in het dropdown menu naar een bepaalde pagina gaat blijft te naam van dat menu ook staan op de naam van die pagina.
Stel ik ga naar het menu "Links" en dan naar "link ons" dan blijft dat menu "link ons" heten en niet Links. Soms dus irritant want mensen weten dan niet waar ze moeten kijken voor een andere pagina (er staan namelijk meerdere menu's bij elkaar).

Is het mogelijk dat wanneer je naar een pagina bent gegaan de gewone menu titel er weer komt te staan? zo ja dan zou ik graag weten hoe Het script is hierboven te vinden.

BerichtGeplaatst: 26 jun 2005 09:13
door Derk
met dit zou het moeten werken


[syntax="javascript"]<head>
<script language="Javascript"><!--

function goThere(form){
var linkList=form.selectThis.selectedIndex
if(!linkList==""){main.location.href=form.selectThis.options[linkList].value;
document.dropMenu.reset()}
}
//--></script>
</head>


<body>
<form name="dropMenu">
<select name="selectThis" onChange="goThere(this.form);" style="border: 1px solid #000000; background-color: #A5C67B">
<option selected value="">Habbocity
<option value="">-----------------
<option value="http://www.habbocity.nl/magazine.htm">HC Magazine</option>
<option value="http://www.habbocity.nl/team.html">Team
<option value="http://www.habbocity.nl/forum.html">Forum
<option value="http://www.habbocity.nl/contact.php">Contact
<option value="http://www.habbocity.nl/sollicitatie.php">Sollicitatie
</select>
</form>
</body>

<p><iframe name="main" src="http://www.habbocity.nl/magazine.htm">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe></p>[/syntax]




edit: ik heb het getest en het werkt Smile ik heb alleen geen idee hoe je terug naar de home wilt gaan....
maargoed ik denk dat je het dan iets anders gebruikt dan op die site en de 1e alleen als naamkaartje gebruikt dan is het wel leuk....
hmzz ik zou hier ook aan kunnen denken voor mijn site geen slecht idee....

BerichtGeplaatst: 26 jun 2005 11:14
door Anonymous
ik heb nu dit in het script geplaatst:

[syntax="taal"]value;document.dropMenu.reset()][/syntax]

Maar wanneer je dus een pagina in het menu hebt bezocht blijft de menu titel nog steeds hetzelfde als de pagina waar je heen bent gegaan helaas.
Www.habbocity.nl/index3.html kan je het menu zien (en snap je misschien wat beter wat ik bedoel Wink )

Ik zou zelf echt niet weten hoe ik dat goed kan krijgen, dus misschien iemand nog een idee? Embarassed

BerichtGeplaatst: 26 jun 2005 12:14
door Derk
hmm ik zie je probleem...
omdat ik het form aanroep dat jij 5 keer opnieuw opent onder dezelfde naam werkt het niet

[syntax="html"]<body>
<div style="position: absolute; top: 188; left: 94;">
<form name="dropMenu">
<select name="selectThis" onChange="goThere(this.form);" style="border: 1px solid #000000; background-color: #87CEEB">

<option selected value="">Habbocity
<option value="">-----------------
<option value="http://www.habbocity.nl/magazine.htm">HC Magazine</option>
<option value="http://www.habbocity.nl/team.html">Team
<option value="http://www.habbocity.nl/forum.html">Forum
<option value="http://www.habbocity.nl/contact.php">Contact
<option value="http://www.habbocity.nl/sollicitatie.php">Sollicitatie
</select>
</form>
</div>

<div style="position: absolute; top: 188; left: 217;">
<form name="dropMenu">
<select name="selectThis" onChange="goThere(this.form);" style="border: 1px solid #000000; background-color: #87CEEB">

<option selected value=""><b>Habbohotel</b>
<option value="">-----------------
<option value="http://www.habbocity.nl/nieuws/cutenews/show_news.php">Nieuws
<option value="http://www.habbocity.nl/wegwijzers.html">Habbo gidsen
<option value="http://www.habbocity.nl/habboregels.html">Habbo regels
<option value="http://ad2.habbohotel.se/phpads/atlas/habboatlas3.php?domain=nl">Habbo atlas
<option value="http://www.habbocity.nl/hobba.html">Hobba's
<option value="">
<option value="">Hobba Tribes
<option value="">-----------------
<option value="htt://www.habbocity.nl/vatoslocos.html">Vatos Locos
</select>
</form>

</div>

<div style="position: absolute; top: 188; left: 344;">
<form name="dropMenu">
<select name="selectThis" onChange="goThere(this.form);" style="border: 1px solid #000000; background-color: #87CEEB">
<option selected value="">Veiligheid
<option value="">-----------------
<option value="http://www.habbocity.nl/veiligheid.html">Veiligheid
<option value="http://www.habbocity.nl/tipstegenfraude.html">Safety tips
</select>
</form>
</div>

<div style="position: absolute; top: 188; left: 454;">
<form name="dropMenu">

<select name="selectThis" onChange="goThere(this.form);" style="border: 1px solid #000000; background-color: #87CEEB">
<option selected value="">Ruilwereld
<option value="">-----------------
<option value="http://www.habbocity.nl/hcruil.htm">HC Ruilwereld
</select>
</form>
</div>

<div style="position: absolute; top: 188; left: 580;">
<form name="dropMenu">
<select name="selectThis" onChange="goThere(this.form);" style="border: 1px solid #000000; background-color: #87CEEB">
<option selected value="">Clipjes
<option value="">-----------------
<option value="http://www.habbocity.nl/clipjes.htm">Clipjes
</select>

</form>
</div>

<div style="position: absolute; top: 188; left: 689;">
<form name="dropMenu">
<select name="selectThis" onChange="goThere(this.form);" style="border: 1px solid #000000; background-color: #87CEEB">
<option selected value="">Extra's
<option value="">-----------------
<option value="http://www.habbocity.nl/habbogoodies.html">Goodies
<option value="http://www.habbocity.nl/intervieuws.html">Interviews
<option value="http://www.habbocity.nl/wedstrijden.html">Wedstrijden
<option value="http://www.habbocity.nl/kleurplaten.html">Kleurplaten
<option value="http://www.habbocity.nl/tipsentricks.html">Tips & Tricks
<option value="http://www.habbocity.nl/poll/poll.php">Poll
</select>

</form>
</div>

<div style="position: absolute; top: 188; left: 810;">
<form name="dropMenu">
<select name="selectThis" onChange="goThere(this.form);" style="border: 1px solid #000000; background-color: #87CEEB">
<option selected value="">Link´s
<option value="">-----------------
<option value="http://www.habbocity.nl/links.html">Fansite´s
<option value="http://www.habbocity.nl/hotels.html">Hotel´s
<option value="http://www.habbocity.nl/linkons.html">Link ons
<option value="http://www.habbocity.nl/stafflogin.html">Staff login
</select>
</form>
</body>[/syntax]

hier doe je ieder form dezelfde naam geven
officieel mag dat niet met html.
als je ze nu eens nummert en dan ieder form apart reset.
het is geen profi oplossing maar het zal wel werken
dus zo:

[syntax="html"]<body>
<div style="position: absolute; top: 188; left: 94;">
<form name="dropMenu0">
<select name="selectThis" onChange="goThere(this.form);" style="border: 1px solid #000000; background-color: #87CEEB">

<option selected value="">Habbocity
<option value="">-----------------
<option value="http://www.habbocity.nl/magazine.htm">HC Magazine</option>
<option value="http://www.habbocity.nl/team.html">Team
<option value="http://www.habbocity.nl/forum.html">Forum
<option value="http://www.habbocity.nl/contact.php">Contact
<option value="http://www.habbocity.nl/sollicitatie.php">Sollicitatie
</select>
</form>
</div>

<div style="position: absolute; top: 188; left: 217;">
<form name="dropMenu1">
<select name="selectThis" onChange="goThere(this.form);" style="border: 1px solid #000000; background-color: #87CEEB">

<option selected value=""><b>Habbohotel</b>
<option value="">-----------------
<option value="http://www.habbocity.nl/nieuws/cutenews/show_news.php">Nieuws
<option value="http://www.habbocity.nl/wegwijzers.html">Habbo gidsen
<option value="http://www.habbocity.nl/habboregels.html">Habbo regels
<option value="http://ad2.habbohotel.se/phpads/atlas/habboatlas3.php?domain=nl">Habbo atlas
<option value="http://www.habbocity.nl/hobba.html">Hobba's
<option value="">
<option value="">Hobba Tribes
<option value="">-----------------
<option value="htt://www.habbocity.nl/vatoslocos.html">Vatos Locos
</select>
</form>

</div>

<div style="position: absolute; top: 188; left: 344;">
<form name="dropMenu2">
<select name="selectThis" onChange="goThere(this.form);" style="border: 1px solid #000000; background-color: #87CEEB">
<option selected value="">Veiligheid
<option value="">-----------------
<option value="http://www.habbocity.nl/veiligheid.html">Veiligheid
<option value="http://www.habbocity.nl/tipstegenfraude.html">Safety tips
</select>
</form>
</div>

<div style="position: absolute; top: 188; left: 454;">
<form name="dropMenu3">

<select name="selectThis" onChange="goThere(this.form);" style="border: 1px solid #000000; background-color: #87CEEB">
<option selected value="">Ruilwereld
<option value="">-----------------
<option value="http://www.habbocity.nl/hcruil.htm">HC Ruilwereld
</select>
</form>
</div>

<div style="position: absolute; top: 188; left: 580;">
<form name="dropMenu4">
<select name="selectThis" onChange="goThere(this.form);" style="border: 1px solid #000000; background-color: #87CEEB">
<option selected value="">Clipjes
<option value="">-----------------
<option value="http://www.habbocity.nl/clipjes.htm">Clipjes
</select>

</form>
</div>

<div style="position: absolute; top: 188; left: 689;">
<form name="dropMenu5">
<select name="selectThis" onChange="goThere(this.form);" style="border: 1px solid #000000; background-color: #87CEEB">
<option selected value="">Extra's
<option value="">-----------------
<option value="http://www.habbocity.nl/habbogoodies.html">Goodies
<option value="http://www.habbocity.nl/intervieuws.html">Interviews
<option value="http://www.habbocity.nl/wedstrijden.html">Wedstrijden
<option value="http://www.habbocity.nl/kleurplaten.html">Kleurplaten
<option value="http://www.habbocity.nl/tipsentricks.html">Tips & Tricks
<option value="http://www.habbocity.nl/poll/poll.php">Poll
</select>

</form>
</div>

<div style="position: absolute; top: 188; left: 810;">
<form name="dropMenu6">
<select name="selectThis" onChange="goThere(this.form);" style="border: 1px solid #000000; background-color: #87CEEB">
<option selected value="">Link´s
<option value="">-----------------
<option value="http://www.habbocity.nl/links.html">Fansite´s
<option value="http://www.habbocity.nl/hotels.html">Hotel´s
<option value="http://www.habbocity.nl/linkons.html">Link ons
<option value="http://www.habbocity.nl/stafflogin.html">Staff login
</select>
</form>
</body>[/syntax]

en dan dit script:

[syntax="javascript"]<script language="Javascript"><!--

function goThere(form){
var linkList=form.selectThis.selectedIndex
if(!linkList==""){main.location.href=form.selectThis.options[linkList].value;
document.dropMenu0.reset()
document.dropMenu1.reset()
document.dropMenu2.reset()
document.dropMenu3.reset()
document.dropMenu4.reset()
document.dropMenu5.reset()
document.dropMenu6.reset()
}
}
//--></script>[/syntax]

vlogens mij zou het zo moeten werken

BerichtGeplaatst: 26 jun 2005 13:16
door Anonymous

Re: Dropdown menu linken met iframe

BerichtGeplaatst: 30 jan 2006 17:10
door Dennis Cohn

Re: Dropdown menu linken met iframe

BerichtGeplaatst: 30 jan 2006 17:34
door Krassie

Re: Dropdown menu linken met iframe

BerichtGeplaatst: 30 jan 2006 17:59
door Derk

Re: Dropdown menu linken met iframe

BerichtGeplaatst: 30 jan 2006 18:43
door Krassie

Re: Dropdown menu linken met iframe

BerichtGeplaatst: 30 jan 2006 18:55
door Dennis Cohn