mattboy_slim
06-15-2009, 05:45 PM
I have a section of a web site that has a tabbed navigation with different categories of news (National/World/Politics/Etc). Currently, the page simply loads, by default, the 'National' tab, and the other tabs are only active 'onClick'.
The current links look like this:
<a href="#" onclick="func_displaynews('World'); return false;" class="news-world-on"><span>World</span></a>
The content of func_displaynews is this:
function func_displaynews(var_newsID){
var xmlHttp = GetXmlHttpObject();
var url = "../_include/ajax_load-newsselection.asp";
url += "?ID="+var_newsID;
if (!xmlHttp){
alert ("Browser does not support HTTP Request")
return
}
xmlHttp.onreadystatechange=function(){
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
document.getElementById("news").innerHTML=xmlHttp.responseText;
}
};
xmlHttp.open("GET", url, true);
xmlHttp.send(null);
}
I'd love for this to simply tab through the news types automatically rather than having to wait for user interaction. Is this possible, or is it just a pipe dream? I searched for "automatic refreshing" along with a number of other queries, but I may just not understand what the "term" is for what I want to do.
Thanks in advance,
Matt
The current links look like this:
<a href="#" onclick="func_displaynews('World'); return false;" class="news-world-on"><span>World</span></a>
The content of func_displaynews is this:
function func_displaynews(var_newsID){
var xmlHttp = GetXmlHttpObject();
var url = "../_include/ajax_load-newsselection.asp";
url += "?ID="+var_newsID;
if (!xmlHttp){
alert ("Browser does not support HTTP Request")
return
}
xmlHttp.onreadystatechange=function(){
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
document.getElementById("news").innerHTML=xmlHttp.responseText;
}
};
xmlHttp.open("GET", url, true);
xmlHttp.send(null);
}
I'd love for this to simply tab through the news types automatically rather than having to wait for user interaction. Is this possible, or is it just a pipe dream? I searched for "automatic refreshing" along with a number of other queries, but I may just not understand what the "term" is for what I want to do.
Thanks in advance,
Matt