/    Sign up×
Community /Pin to ProfileBookmark

Reloading Frames

I am stuck and this is the last thing i need to accomplish before i can live a normal life again.

Heres the skinny:

I have a frameset with 3 frames(you dont have to give me a lecture on why to not use frames, i just am).

Top Frame is used for a logo, nothing more.

Middle frame is where all the action happens (name: synch_frame)

Bottom Frame refreshes every 30 seconds to check for the state the middle frame is SUPPOSED to be in. We’ll just say on(1)/off(2) even though there are more. I built an administration site which controls the state of the application via ASP and an SQL DB.

What is supposed to happen is when the page reloads, it checks to see the updated state, if there is one, if the state of the main frame is different from newly gotten state in the bottom frame, it reloads the main frame, which will show the updated info.

<CODE>
var CompStateID=<%=Session(“EventState”) %>;

function reloadFrame() {
self.location.reload();
}

if (CompStateID != parent.frames[‘synch_frame’].CompStateID) {
parent.frames[‘synch_frame’].location.reload();
<% Session(“EventState”) = State %>
}
</CODE>

And just for completness…

<CODE>
<body topmargin=’0′ leftmargin=’0′ marginheight=’0′ marginwidth=’0′ onload=”setTimeout(‘reloadFrame()’,30000);”>
</CODE>

What am I doing wrong? I appreciate any kind of help. Thank you very much.

~Rich

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@GazthrakauthorSep 13.2004 — woah, in my haste, i type in the wrong thing for the following line:

<CODE>

var CompStateID=<%=Session("EventState") %>;

</CODE>

Its supposed to be:

<CODE>

var CompStateID=<%=State %>;

<CODE>

They would always match if it was the other way. DOH!

I am searching the database in the bottom refresh page to get the state. Debugging has shown me that it updates the state. but does not reload the middle frame to the right page for that state.
×

Success!

Help @Gazthrak spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...