IFRAME - Refresh Table on Parent Window - maintain IFRAME State

S

Scott

I have an IFRAME that is calling a stored procedure - that once completed I
need to have do a "refresh" on the PARENT window that will then call another
stored procedure to refresh a table with a result set. My problem is, I
need to keep the IFRAME at its current state. Any ideas? For example:

In the IFRAME, I would have a page that would allow the user to key in a
payment for an account, apply the payment them the page passes the payment
to a SQL Server stored procedure to insert the payment and other account
information into a table in the database. On the PARENT page, there is a
table that is keeping a "LIST" of all payments that the users has made on
all their accounts - could be one or many - evertime the user applys the
paymen in the IFRAME window, I need the PARENT window refreshed so that the
stored procedure in that page can be called to load the table that displays
the payments that have already been applied, but I cannot have the current
state of the IFRAME (payment window) changed - must stay the same - Make
sense? Just that table that lists the payments is all I need updated.
Right now I can get the PARTENT page to update ever xxxx number of seconds,
but that's not what I want, or I can get the PARENT page to update, but the
IFRAME goes back to its orginal state (information asp page), cannot get it
to maintain the payment window state.

Thanks in advance for the help.
 
A

Aaron Bertrand [MVP]

stored procedure to refresh a table with a result set. My problem is, I
need to keep the IFRAME at its current state. Any ideas?

No, can't be done. You would have to refresh the parent page and pass
parameters that the page could then pass to the IFRAME, to return the IFRAME
to the same state.
 
S

Scott

Is there a way to check the force the src of the IFRAME when the PARENT page
is loaded? Say when the page if first loaded check to see if the src is
"null" or something if it is force the src to be the "message" asp page if
not force the src to be the "payment" asp page? If so how would I do that?
 
A

Aaron Bertrand [MVP]

Well, when you initially call the ASP page, don't have a specific argument
in the querystring. When you refresh it from the IFRAME, call
yourpage.asp?checktheforcethesrc=1 and yourpage.asp can have appropriate
logic.

I'm not sure what you mean by "check the force the src" but you can
certainly differentiate between initial load and refresh by adding
parameters to the querystring.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
 
M

[MSFT]

Hi Scott,

Regarding the issue, can you consider also puting the Payment table in
Parent page in a Iframe? In this way, you may only need to update this
frame.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
S

Scott

Never thought about that - How would I go about loading it from the PARENT
Page or from the IFRAME? I like that idea. Gives me more control
 
M

[MSFT]

Hi Scott,

I think you may create a single web page for all payments table and embed
it in a iframe element. To refersh such a sub page, the script is like:

window.frames("IFrm").location = vLocation

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top