I'd like to use dial a site for my navigation. My home page is broken up into 3 frames - header on top (row), dial a site on my left (col), and the main frame. When I use dial a site to go to a URL it loads into the same frame as the dial a site navigator(col). Question - I need to either have the URL load into another frame, - or - have the URL load into another browser window. There's no <a href................ so I Have No Idea How To Do It
Code:
if (phone_num=="01")
document.location="http://javascript.internet.com";
<!-- TWO STEPS TO INSTALL DIAL-A-SITE:
1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original: Yosi Schiff (GreenDevil120@aol.com) -->
<!-- Web Site: http://www.angelfire.com/realm/molkajavascripts/ -->
<!-- Begin
var phone_num='';
var timerID = null;
var timerRunning = false;
function but1()
{
phone_num = phone_num + '1';
chknum();
}
function but2()
{
phone_num = phone_num + '2';
chknum();
}
function but3()
{
phone_num = phone_num + '3';
chknum();
}
function but4()
{
phone_num = phone_num + '4';
chknum();
}
function but5()
{
phone_num = phone_num + '5';
chknum();
}
function but6()
{
phone_num = phone_num + '6';
chknum();
}
function but7()
{
phone_num = phone_num + '7';
chknum();
}
function but8()
{
phone_num = phone_num + '8';
chknum();
}
function but9()
{
phone_num = phone_num + '9';
chknum();
}
function but0()
{
phone_num = phone_num + '0';
chknum();
}
function chknum()
{
//ADD YOUR NUMBERS AND URLS HERE
if (phone_num=="01")
document.location="http://javascript.internet.com";
if (phone_num=="123")
document.location="http://webdevelopersJournal.com";
document.board.pn.value=phone_num;
}
function clearit()
{
phone_num = "";
document.board.pn.value=phone_num;
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<h2>01= homepage & 123= Web Developers Journal</h2>
<br><br>
<form name="board">
<center>
<table BORDER CELLSPACING=0 CELLPADDING=0 COLS=3 WIDTH="135" BGCOLOR="#FF0000" >
<tr ALIGN=CENTER>
<td><input type=button value=" 1 "onClick="but1(); window.focus()"></td>
<td><input type=button value=" 2 "onClick="but2(); window.focus()"></td>
<td><input type=button value=" 3 "onClick="but3(); window.focus()"></td>
</tr>
<tr ALIGN=CENTER>
<td><input type=button value=" 4 "onClick="but4(); window.focus()"></td>
<td><input type=button value=" 5 "onClick="but5(); window.focus()"></td>
<td><input type=button value=" 6 "onClick="but6(); window.focus()"></td>
</tr>
<tr ALIGN=CENTER>
<td><input type=button value=" 7 "onClick="but7(); window.focus()"></td>
<td><input type=button value=" 8 "onClick="but8(); window.focus()"></td>
<td><input type=button value=" 9 "onClick="but9(); window.focus()"></td>
</tr>
<tr ALIGN=CENTER>
<td COLSPAN="3">
<center><table BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=2 WIDTH="100%" >
<tr>
<td ALIGN=CENTER WIDTH="50%"><input type=button value=" 0 "onClick="but0(); window.focus()"></td>
<td ALIGN=CENTER WIDTH="50%"><input type=button value="Reset"onClick="clearit(); window.focus()"></td>
</tr>
</table></center>
</td>
</tr>
<tr>
<td ALIGN=CENTER COLSPAN="3"><input type=text name=pn size="10"></td>
</tr>
</table></center>
<center></form>
<p><!-- --></center>
<p><center>
<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
Last edited by alp0001; 02-23-2004 at 07:30 PM.
Reason: Added [code] tags
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET. subscribe