Computing.Net > Forums > Web Development > Select Frame to load

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Select Frame to load

Reply to Message Icon

Name: RTAdams89
Date: May 18, 2004 at 15:42:16 Pacific
OS: na
CPU/Ram: na
Comment:

I want to creat a web page with 2 frames. The first frame will ahve a combo box where the user selects the page to display in the second frame. How do I do this?

PS: I know how to make frams, but how do I get the selection in the combobox to change the content of the other frame?

-Ryan Adams
Ryan's
Custom Computers



Sponsored Link
Ads by Google

Response Number 1
Name: rohinkoul
Date: May 19, 2004 at 01:22:01 Pacific
Reply:

I think you can use javascript for the purpose.

Set the onclick property of the options in the select box to some java script function which then loads the corresponding page in the second frame.

You can use the name of the second frame to refer to it using the javascript.


0

Response Number 2
Name: chaud
Date: May 19, 2004 at 04:58:15 Pacific
Reply:

No, no, no
Name the frame where the pages will load, main
Name the menu frame menu
Do that by putting name="menu" and name"main" in the frame tag. Then make links like
<*a href=page.html target=main>
Without the * of course.
Thats all, no crazy java required

http://excellhosting.net for all your hosting needs.


0

Response Number 3
Name: SN
Date: May 19, 2004 at 07:50:03 Pacific
Reply:

yes, yes, yes :-)

Chaud's approach works for links, but not for a dropdown box. The code should look something like this: (assuming the names chaud used for the frames)

<SCRIPT language='javascript'>
function switchPages()
{
comboBox=document.getElementById('combo');
top.main.location=comboBox.value;
}
</script>
<SELECT name='combo' onChange='switchPages()'>
<Option value='http://me.com/page1.html'>
<Option value='http://me.com/page2.html'>
</select>


0

Response Number 4
Name: chaud
Date: May 19, 2004 at 14:10:34 Pacific
Reply:

Well he didnt say dropdown, combo could be....a big box with links in it :-P

http://excellhosting.net for all your hosting needs.


0

Response Number 5
Name: RTAdams89
Date: May 19, 2004 at 15:17:33 Pacific
Reply:

Thanks guys. here is what i ended up doing

http://www.pageresource.com/jscript/jdrop3.htm

-Ryan Adams
Ryan's
Custom Computers


0

Related Posts

See More



Response Number 6
Name: SN
Date: May 19, 2004 at 16:31:29 Pacific
Reply:

That is the same concept as what I said above, except it puts the code in the HTML tags rather than in a function.

The way I did it above also works with older versions of netscape, while the version in your link does not.

-SN


0

Response Number 7
Name: thepineapplehead
Date: May 20, 2004 at 03:10:26 Pacific
Reply:

Hey, I tried thi with my iframes site but it doesn't work. DOes this work ith iframes?

The page is at pleth0ra.co.uk/retro

Poor Stevie. They never did find his head.


0

Response Number 8
Name: chaud
Date: May 20, 2004 at 05:18:12 Pacific
Reply:

At your site it works for me...

http://excellhosting.net for all your hosting needs.


0

Sponsored Link
Ads by Google
Reply to Message Icon

MCAD readiness eval .pfc file conversion for ...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Select Frame to load

Frame - Page Title www.computing.net/answers/webdevel/frame-page-title/215.html

Create Shortcut/Frames Page www.computing.net/answers/webdevel/create-shortcutframes-page/1456.html

sequentially open windows in frame www.computing.net/answers/webdevel/sequentially-open-windows-in-frame/230.html