Frames and Links Problem

windows

Guest
Hey all, okie i am having problems with making my menu links go form one side of the to the other side of the frames, meaing if i click on the Main link my page would come up in the second part fo the frame. please help me i have had a big headache over this... this is the code, if you can please help:<br />
<br />
<br />
<br />
var clicked=""<br />
var gtype=".gif"<br />
var selstate="_over"<br />
if (typeof(loc)=="undefined" || loc==""){<br />
var loc=""<br />
if (document.body&&document.body.innerHTML){<br />
var tt = document.body.innerHTML.toLowerCase();<br />
var last = tt.indexOf("da_site.js\"");<br />
if (last>0){<br />
var first = tt.lastIndexOf("\"", last);<br />
if (first>0 && first<last) loc = document.body.innerHTML.substr(first+1,last-first-1);<br />
}<br />
}<br />
}<br />
<br />
document.write("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>");<br />
tr(false);<br />
writeButton(loc+"","da_site.html","da_site_b1",118,18,"Main","",0);<br />
writeButton(loc+"","da_site02.html","da_site_b2",118,18,"Warrior","",0);<br />
writeButton(loc+"","da_site03.html","da_site_b3",118,19,"Monk","",0);<br />
writeButton(loc+"","da_site04.html","da_site_b4",118,18,"Rogue","",0);<br />
writeButton(loc+"","da_site05.html","da_site_b5",118,18,"Wizard","",0);<br />
writeButton(loc+"","da_site06.html","da_site_b6",118,18,"Priest","",0);<br />
writeButton(loc+"","da_site07.html","da_site_b7",118,19,"Religions","",0);<br />
writeButton(loc+"","da_site08.html","da_site_b8",118,18,"Mastering","",0);<br />
writeButton(loc+"","da_site09.html","da_site_b9",118,19,"Subpathing","",0);<br />
writeButton(loc+"","da_site10.html","da_site_b10",118,18,"Items","",0);<br />
writeButton(loc+"","da_site11.html","da_site_b11",118,18,"Events","",0);<br />
writeButton(loc+"","da_site12.html","da_site_b12",118,18,"Quests","",0);<br />
writeButton(loc+"","da_site13.html","da_site_b13",118,18,"Forum","",0);<br />
writeButton(loc+"","da_site14.html","da_site_b14",118,19,"Download <!--more-->","",0);<br />
writeButton(loc+"","da_site15.html","da_site_b15",118,19,"Valkyries","",0);<br />
writeButton(loc+"","da_site16.html","da_site_b16",118,18,"Contacts","",0);<br />
tr(true);<br />
document.write("</tr></table>")<br />
loc="";<br />
<br />
function tr(b){if (b) document.write("<tr>");else document.write("</tr>");}<br />
<br />
function turn_over(name) {<br />
if (document.images != null && clicked != name) {<br />
document[name].src = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/document">http://www.webdeveloper.com/forum/archi ... p/document</a><!-- m -->[name+"_over"].src;<br />
}<br />
}<br />
<br />
function turn_off(name) {<br />
if (document.images != null && clicked != name) {<br />
document[name].src = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/document">http://www.webdeveloper.com/forum/archi ... p/document</a><!-- m -->[name+"_off"].src;<br />
}<br />
}<br />
<br />
function reg(gname,name)<br />
{<br />
if (document.images)<br />
{<br />
document[name+"_off"] = new Image();<br />
document[name+"_off"].src = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/loc+gname+gtype;">http://www.webdeveloper.com/forum/archi ... ame+gtype;</a><!-- m --><br />
document[name+"_over"] = new Image();<br />
document[name+"_over"].src = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/loc+gname+">http://www.webdeveloper.com/forum/archi ... loc+gname+</a><!-- m -->"_over"+gtype;<br />
}<br />
}<br />
<br />
function evs(name){ return " onmouseover=\"turn_over('"+ name + "')\" onmouseout=\"turn_off('"+ name + "')\""}<br />
<br />
function writeButton(urld, url, name, w, h, alt, target, hsp)<br />
{<br />
gname = name;<br />
while(typeof(document[name])!="undefined") name += "x";<br />
reg(gname, name);<br />
tr(true);<br />
document.write("<td>");<br />
if (alt != "") alt = " alt=\"" + alt + "\"";<br />
if (target != "") target = " target=\"" + target + "\"";<br />
if (w > 0) w = " width=\""+w+"\""; else w = "";<br />
if (h > 0) h = " height=\""+h+"\""; else h = "";<br />
if (url != "") url = " href=http://www.webdeveloper.com/forum/archive/index.php/\"" + urld + url + "\"";<br />
<br />
document.write("<a " + url + evs(name) + target + ">");<br />
<br />
if (hsp == -1) hsp =" align=\"right\"";<br />
else if (hsp > 0) hsp = " hspace=\""+hsp+"\"";<br />
else hsp = "";<br />
<br />
document.write("<img src=http://www.webdeveloper.com/forum/archive/index.php/\""+loc+gname+gtype+"\" name=\"" + name + "\"" + w + h + alt + hsp + " border=\"0\" /></a></td>");<br />
tr(false);<br />
}<!--content-->That is some nice JavaScript you got there for your site navigation.<br />
But tell me, how will the 10-15% of visitors that don't have JS navigate your site?<br />
<br />
JavaScript is good for a lot of things, but not for creating the navigation menu on a site, as it breaks too easily.<br />
<br />
<br />
The simple HTML you should use to get it to work in a frames enviromant is<br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"..." target="the name you have in your frameset for the page you want the link to appear in">Link</a><!--content-->well thats why i am going to have one site with and one site without, so poeple can choose<!--content-->
 
Back
Top