Switch17
04-23-2003, 11:58 PM
Hi, I came across this script on the web, and it works great giving you the latest scores, and such for different sports. However, I'm hoping someone can help me with it. Currently, when you choose a score or link, it will open up the page in the same window, taking you off your site. I'm hoping someone can show me how to alter it so that the links open in a new window.
<center><form name="jumpy">
<select name="example" size="1" onChange="gone();">
<option value="http://www.sportsline.com/nfl/box-scoreboards">nfl</option>
<option value="http://www.sportsline.com/mlb/box-scoreboards">mlb</option>
<option value="http://www.sportsline.com/nhl/box-scoreboards">nhl</option>
<option value="http://www.sportsline.com/nba/box-scoreboards">nba</option>
<option value="http://www.sportsline.com/u/includes/script/PGA_leader_inc.htm">pga</option>
<option value="http://www.sportsline.com/collegefootball/box-scoreboards">NCAA Football</option>
<option value="http://www.sportsline.com/collegebasketball/box-scoreboards">NCAA Basketball</option>
<option value="http://www.vegasinsider.com/u/includes/script/odds_inc.htm">Las Vegas Odds</option>
</select>
</form><center>
<p>Courtesy of CBS Sportsline<p>
<script language="javascript">
var displaymode=0;
<!-- This adds the iframe -->
var iframecode="<center><iframe id='external' style='width:155;height:220;' src='http://www.sportsline.com/nfl/box-scoreboards' scrolling='auto' border=0 marginwidth=1 marginheight=1 align=center frameborder=0></iframe></center>";
if (displaymode==0) {
document.write(iframecode);
}
function gone(){
var selectedurl=document.jumpy.example.options[document.jumpy.example.selectedIndex].value;
if (document.getElementById&&displaymode==0) {
document.getElementById("external").src=selectedurl;
} else if (document.all&&displaymode==0) {
document.all.external.src=selectedurl;
} else {
if (!window.win2||win2.closed) {
win2=window.open(selectedurl);
} else {
win2.location=selectedurl;
win2.focus();
}
}
}
</script>
<center><form name="jumpy">
<select name="example" size="1" onChange="gone();">
<option value="http://www.sportsline.com/nfl/box-scoreboards">nfl</option>
<option value="http://www.sportsline.com/mlb/box-scoreboards">mlb</option>
<option value="http://www.sportsline.com/nhl/box-scoreboards">nhl</option>
<option value="http://www.sportsline.com/nba/box-scoreboards">nba</option>
<option value="http://www.sportsline.com/u/includes/script/PGA_leader_inc.htm">pga</option>
<option value="http://www.sportsline.com/collegefootball/box-scoreboards">NCAA Football</option>
<option value="http://www.sportsline.com/collegebasketball/box-scoreboards">NCAA Basketball</option>
<option value="http://www.vegasinsider.com/u/includes/script/odds_inc.htm">Las Vegas Odds</option>
</select>
</form><center>
<p>Courtesy of CBS Sportsline<p>
<script language="javascript">
var displaymode=0;
<!-- This adds the iframe -->
var iframecode="<center><iframe id='external' style='width:155;height:220;' src='http://www.sportsline.com/nfl/box-scoreboards' scrolling='auto' border=0 marginwidth=1 marginheight=1 align=center frameborder=0></iframe></center>";
if (displaymode==0) {
document.write(iframecode);
}
function gone(){
var selectedurl=document.jumpy.example.options[document.jumpy.example.selectedIndex].value;
if (document.getElementById&&displaymode==0) {
document.getElementById("external").src=selectedurl;
} else if (document.all&&displaymode==0) {
document.all.external.src=selectedurl;
} else {
if (!window.win2||win2.closed) {
win2=window.open(selectedurl);
} else {
win2.location=selectedurl;
win2.focus();
}
}
}
</script>