/    Sign up×
Community /Pin to ProfileBookmark

Jump/Go Menu with frames?

I have a drop down menu that once you click on the name it takes you to that page, now I am putting it on a framed page and I need it to bring up the selected item in my ‘main’ frame. This is what my code looks like….

[QUOTE]

<FORM name=”Games List” >

<SELECT size=1 name=”URL”
onChange=”onChange=”if(‘parent.frames[main]’,this,1)window.location.href=
(options[selectedIndex].value)”>

<option selected>Huge Games List</option>
<option value=”http://games.jokersbay.com/games/Games/3dreversi/3dreversi.html”>3D
Reversi</option>
<option value=”http://games.jokersbay.com/games/Games/4x4rally/4x4rally.html”>4×4
Rally</option>
<option value=”http://games.jokersbay.com/games/Games/adventure_elf/adventure_elf.html”>Adventure
Elf</option>
<option value=”http://games.jokersbay.com/games/Games/airdodge/airdodge.html”>Air
Dodge</option>
</select>
</a>

</NOSCRIPT>
</FORM>

[/QUOTE]

I will appreciate any help that you can give. ?

to post a comment
HTML

1 Comments(s)

Copy linkTweet thisAlerts:
@creedoFeb 21.2007 — I have a drop down menu that once you click on the name it takes you to that page, now I am putting it on a framed page and I need it to bring up the selected item in my 'main' frame. This is what my code looks like....

I will appreciate any help that you can give. ?[/QUOTE]


this should help..put this on your body

<FORM

METHOD=POST onSubmit="return dropdown(this.gourl)"

TARGET=MAIN
>
<SELECT NAME="gourl">

<option selected>Huge Games List</option>

<option value="http://games.jokersbay.com/games/Games/3dreversi/3dreversi.html">3D

Reversi</option>

<option value="http://games.jokersbay.com/games/Games/4x4rally/4x4rally.html">4x4

Rally</option>

<option value="http://games.jokersbay.com/games/Games/adventure_elf/adventure_elf.html">Adventure

Elf</option>

<option value="http://games.jokersbay.com/games/Games/airdodge/airdodge.html">Air

Dodge</option>

</SELECT>

<INPUT TYPE=SUBMIT VALUE="Go">

</FORM>

i had just copy your code and edited it..

put this in your head to process the request:

<script type="text/javascript">

<!--

function dropdown(mySel)

{

var myWin, myVal;

myVal = mySel.options[mySel.selectedIndex].value;

if(myVal)

{

if(mySel.form.target)myWin = parent[mySel.form.target];

else myWin = window;

if (! myWin) return true;

myWin.location = myVal;

}

return false;

}

//-->

</script>

note: you must change target=main in the form with the frame name..

hope this help..
×

Success!

Help @Normac04 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...