Click to See Complete Forum and Search --> : <<[combo Box Linking Frame]>>


HELP_PLEASE
06-10-2003, 12:42 AM
Hello, I just wanted to ask you if u can add some words to my script so that my COMBO BOX LINKS target the same page frame, i found a website (http://www.dynamicdrive.com/dynamic...ropdownview.htm)
that post an script similar to my question but that one just creates a frame window with JavaScript code, and mine is always there is independent not created by java script, my frame is at the bottom of this text, it is called "Page Frame" and I just want the COMBO BOX LINKS to be opened there.

What this script does is open the links in a new window without pressing the "Go" button, i want the links to be opened the same way but not in a new window just eliminate the open in new window part and change it to open it in my "Page Frame".

If you can please post the new script, because if you give me any code I wont know what to do with it or where to place it.

Thanx for you help.

|-------------------------------------------------------------------------------------------------------|

<head><script language="JavaScript">

function SelectIt(){
if (document.Links.Select.options[document.Links.Select.selectedIndex].value != "none"){
url = document.Links.Select.options[document.Links.Select.selectedIndex].value
NewWindow=window.open( url ,"_NewWindow_","toolbar=0,location=0,status=1,menubar=0,scrollbars=1,resizable=1,width=430,height=270")}
}
//-->


</script>

<title>Combo Box that Links Frame</title>
<base target="frame">
</head>

<body BGCOLOR="#000000" link="#CC0033" vlink="#333399" alink="#FF0000" start text="#FFFFFF"-->

<p align="center">&nbsp;</p>

<table WIDTH="23%" BORDER="0" CELLSPACING="5" CELLPADDING="5">
<tr>
<td WIDTH="100%" bgcolor="#000000" bordercolor="#FFFFFF"><font
FACE="comic sans ms" SIZE="-1">
<form name="Links">
<div align="center"><center><p><select NAME="Select" onchange="SelectIt()" size="1">
<option value="none">[Select A Link] </option>
<option VALUE="http://google.com">Google</option>
<option VALUE="http://www.newgrounds.com">Newgrounds - The Problems of the future today!</option>
</select><!--insert live code here--></font></p>
</center></div>
</form>
</td>
</tr>
</table>
<!--content stop-->
<span style="position: absolute; left: 19; top: 92">
<iframe name="frame" style="border:0px double black" width=443 height=373 src="file:///c:/"></iframe>
</span>
</body>
</html>:) :) :D :D :D

Khalid Ali
06-10-2003, 01:03 AM
Locate the following code in your javascript code

function SelectIt(){
if (document.Links.Select.options[document.Links.Select.selectedIndex].value != "none"){
url = document.Links.Select.options[document.Links.Select.selectedIndex].value
NewWindow=window.open( url ,"_NewWindow_"," toolbar=0,location=0,status=1,menubar=0,scrollbars
=1,resizable=1,width=430,height=270")}
}

and replace it with this

function SelectIt(){
if (document.Links.Select.options[document.Links.Select.selectedIndex].value != "none"){
url = document.Links.Select.options[document.Links.Select.selectedIndex].value
window.location.href = url;//if you want the page to open in current window.
//comment the line above if you want to use frame targetting in linebelow.
//in case you wanted to oopen a frame in a particular frame,uncomment the line below
//parent.framename.location.href = url
}
}

HELP_PLEASE
06-10-2003, 01:21 AM
Thanx a lot for your help, this thing really worked, is cool that people like you like to help noobs :) :)

Khalid Ali
06-10-2003, 09:11 AM
You are so welcome..:p