Categories:

Cut & Paste Combo box with open in another frame or full window support

Credit: JavaScript Kit

Description: So, you're looking for that elusive combo box script that loads the target URL in another frame or full window...well, your search is over. The below combo script allows you to do just that. You can specify the combo to load it's URLs either in a specific frame, or full window (parent window). Enjoy!

Example: Right above you!

Directions

Step 1: Before anything else, you need to first do some "tinkering" to the HTML page containing the <frameset> tags (the master page). The master page for the page you're currently viewing looks like this:

<html>
<head>
<title>Cut & Paste Combo box with open in another frame or full window support</title>
</head>
<frameset rows="48,*" frameborder=0 border=1>
<frame src="comboframe1.htm" scrolling=no name="topframe">
<frame src="comboframe.htm" name="bottomframe">
</frameset>
</html>

The above is a typical frames page, with one difference- it has the "name" attribute defined for each individual frame. You need to add this attribute to your frame page as well, with a unique name for each frame. This name will be used in the below script to tell the script exactly which frame you wish the combo box's URLs to load in.

Step 2: Copy the below code into the <body> section of the page you wish to contain the combo box (ie: "comboframe1.htm"):

Step 3: Finally, you now need to configure two variables in the above script. First, set variable "openmode" to 1 if you wish the combo to load in another frame (like this page), 2 if you wish it to load in the parent window. Second, if "openmode" is set to 1, set "targetframe" to the name of the frame you wish the combo to load in...in this case, "bottomframe". That's it!

Copyright 1997-2014 JavaScript Kit. NO PART may be reproduced without author's permission.