lukeprog
03-28-2003, 05:08 PM
Check this out from the <HEAD> of my HTML page:
var currentpage="1.html"
var searchstring="Search Terms"
var tooltip=""
var excerpt=currentpage.substring(currentpage.lastIndexOf("/")+1, currentpage.lastIndexOf("."))
function changePage() (
currentpage=frames['page'].location.href
excerpt=currentpage.substring(currentpage.lastIndexOf("/")+1, currentpage.lastIndexOf("."))
alert(excerpt)
}
function goHome() {
frames['page'].location.href="Home.html"
changePage()
}
Now, goHome() is referenced from an onclick() for the Home button on my HTML page. But for some reason, there is an error now since I've added this changePage() code, it doesn't work anymore. How do I call the global function changePage() from within other functions successfully?
var currentpage="1.html"
var searchstring="Search Terms"
var tooltip=""
var excerpt=currentpage.substring(currentpage.lastIndexOf("/")+1, currentpage.lastIndexOf("."))
function changePage() (
currentpage=frames['page'].location.href
excerpt=currentpage.substring(currentpage.lastIndexOf("/")+1, currentpage.lastIndexOf("."))
alert(excerpt)
}
function goHome() {
frames['page'].location.href="Home.html"
changePage()
}
Now, goHome() is referenced from an onclick() for the Home button on my HTML page. But for some reason, there is an error now since I've added this changePage() code, it doesn't work anymore. How do I call the global function changePage() from within other functions successfully?