473,486 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Force Page Update?

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.
Dec 17 '05 #1
2 2391
VK

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.

Dec 17 '05 #2

"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;
}
Dec 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2280
by: Charles Soto | last post by:
I've got a main loop script that calls two other scripts that do no user interaction. All they do is send a couple of mysql update statements. Then they use header() to call the main loop again. ...
3
9875
by: buht | last post by:
Hello Everyone, Fairly new to c# here and have a question regarding scrollbars, particularly a vertical scrollbar. It looks like my options are restricted for the textbox scrollbars being...
4
1683
by: tma | last post by:
Short of zipping my file, are there any other alternatives to the below? I'm trying to add anchors in code and I need the link to force a download of the .pdf rather than open a new window or...
2
4562
by: VB Programmer | last post by:
How can I force the DayRender event of my Calendar to run/refresh? The calendar displays data from a database and I am allowing the user to filter out what data they see on the calendar. When...
2
5949
by: DB | last post by:
I have a page that uses ComponentArt components. I have an imagebutton to update one part of the page and there is a graph that should update with it. The problem is the graph has some funky...
6
27756
by: bryanbabula | last post by:
I have a question about overriding i was wondering if anyone could help me with, or even suggesting a better/different way. I have no idea if this can even be done or not. I was wondering if there...
1
10265
by: =?Utf-8?B?QnJ5YW4=?= | last post by:
Is there a way to force a "traditional" full page postback in AJAX? I have a page with multiple UpdatePanels and I usually call UpdatePanel.Update() to do a partial postback, but I have one...
2
3802
by: =?Utf-8?B?U2lsa0NpdHlGbG9yaWRh?= | last post by:
I have a web page "PgA" with a GridView. I open another page "PgB" in a new window. On PgB, they do some things that affect the underlying data for the GridView on PgA. When the user is done...
6
5963
by: Thiago Macedo | last post by:
I could not find on the web a complete solution for this task. This is not the perfect solution, because it's doesn't have the ability to log the logout if browser crash or user leave it open while...
0
7100
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7126
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6842
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5434
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4865
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3070
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.