"VK" <sc**********@yahoo.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
Yogi_Bear_79 wrote: I have a script that parses window.location.hash to figure out which xml
file to load. The xml files populate a page on a framed site. The code
works
correctly to a point.
If I have a seperate html page to support each xml it works. I would like
to
eliminate the individual html pages becuase only one should be needed.
When I use one page the first link works, then the second one does
nothing
(doesn't refresh the frame). If I click to a static image for the frame
then
click the next xml link it works.
What can I do to force the frame to update? I am clicking on a HREF link
that should re-load the html page, but with the new xml data.
Very difficult to guess w/o a code sample. Please post one or a link.
Thanks for the offer to help!
Here is the script: I have a three paged frame. Top is a banner, left is a
menu, right is main content, where the pictures are displayed. I know
frames are generally frowned upon. However, I haven't been able to find an
equivilent script that can display without showing a new html file for every
picture. I think this looks way better than reloading the entire page for
every pic.
var CurrentPage
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM")
xmlDoc.async = false
xmlDoc.load("xml/" + location.hash.substring(1))
var x = xmlDoc.documentElement.childNodes
var iPages = x.length
function GetImage(ScrollDirection){
switch (ScrollDirection) {
case "First":
CurrentPage = 0
break
case "Next":
CurrentPage = CurrentPage + 1
break
case "Prev":
CurrentPage = CurrentPage - 1
}
if (CurrentPage > iPages-1) {
CurrentPage = 0 }
else {
if (CurrentPage < 0) {
CurrentPage = iPages-1 }
}
imgPhoto.src = x.item(CurrentPage).getAttribute("Filename")
/*
PhotoComment.innerText = x.item(CurrentPage).text
PhotoBy.innerHTML = "<IMG src='picBy.ICO' class='Icon'/> " +
x.item(CurrentPage).getAttribute("PhotoBy") + ", " +
x.item(CurrentPage).getAttribute("PhotoDate")
Loading.innerHTML = "Downloading high res image.<BR/><BR/><IMG
src='Loading.gif' class='Loading'/><BR/><BR/>Please wait..."
*/
}
function imageLoad()
{
/* Loading.innerHTML = "" */
}
function SetScreenMode(NewMode)
{
switch (NewMode) {
case "full":
window.open(getURL(), 'fullscreen', 'fullscreen=yes, scrollbars=auto')
break
case "close":
close()
}
}
function getURL()
{
return document.URL;
}