Closed Thread Icon

Topic awaiting preservation: Newbie typical question... i think (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=7943" title="Pages that link to Topic awaiting preservation: Newbie typical question... i think (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Newbie typical question... i think <span class="small">(Page 1 of 1)</span>\

 
Arthemis
Paranoid (IV) Inmate

From: Milky Way
Insane since: Nov 2001

posted posted 11-25-2001 12:47

Okay, here's what I have:
Im trying to make a page that uses three frames: One for the main page, one for a little drop down menu that would make the desired page open in the third frame. How do I design targets in forms?

I tried to make it easy to understand, but in terms of practical concept, here's what:
index.html -> contains the two next as frames
main.html -> main page
bottom.html -> contains the drop down menu and an iframe called "musicplayer"

there are various html files, each one being a mostly blank and similar file apart from possessing a specific background midi.
like so:
mid0.html -> blank midi -> No Music
mid1.html-> midi number one -> music number one
etc

I put them all as values in the drop down menu, and wanted to make them open in the iframe... how do i do that last bit?

how to target the values?


Sorry if it sounds too "unprofessional", but like the subject implied, i am a newbie. ^_^



Ever always is was

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 11-25-2001 15:00

nexbie or not.... this thread belongs more in the DHTML/Javascript forum.....
Find it here.

tskull@hotmail.com">
"A kleptomaniac is a person who helps himself because he can't help himself." --Henry Morgan
ICQ: 67751342

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 11-25-2001 16:24

Add the following code to bottom.html file (where your dropdown and iframe are located):

<SELECT SIZE="1" ONCHANGE="document.frames['musicplayer'].location = this.options[this.selectedIndex].value">
<OPTION VALUE="mid0.html">No Music</OPTION>
<OPTION VALUE="mid1.html">Midi 1</OPTION>
<OPTION VALUE="mid2.html">Midi 2</OPTION>
<OPTION VALUE="mid3.html">Midi 3</OPTION>
</SELECT>


Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 11-25-2001 20:43

document.frames['musicplayer'].location

should be changed to

frames['musicplayer'].location

and can also be merely

frames.musicplayer.location

Arthemis
Paranoid (IV) Inmate

From: Milky Way
Insane since: Nov 2001

posted posted 11-26-2001 02:57

Oh, sorry about that, petskull.
Thanx for the help, I will try it later, it's late and I got some studying to do. I mean it, thank u

Ever always is was

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 11-26-2001 22:09

Slime, I like to specify object which I'm referring to (document, window, etc.) But, as you said, it is not necessary to specify it. On the other hand I wouldn't suggest you to use frames.musicplayer.location, because that's not how arrays should be accessed. This "simplified" way of accessing arrays actually made people use eval() statement more than necessary, because they didn't know how to access array elements when their names are stored in variables (i.e. people use eval("object."+arrayElement+".property") instead of object.array[arrayElement].property)...


« BackwardsOnwards »

Show Forum Drop Down Menu