/    Sign up×
Community /Pin to ProfileBookmark

help on iframe/formsubmission

I have a php script in a form in one iframe….and i would like another iframe that displays the contents of the sql database to refresh when the form is submitted…what is a simple way to do that without javascript?

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@crh3675Jun 24.2004 — You could submit the form to the IFRAME that needs to be reloaded by adding a target attribute to the form

<form method="post" action="datapage.php" target="froametoreload">
Copy linkTweet thisAlerts:
@SidetomauthorJun 24.2004 — only problem is i also have to refresh the current page making the action: <?php echo $PHP_SELF ?> with no target
Copy linkTweet thisAlerts:
@crh3675Jun 27.2004 — Then what you need to do is store the results in a session variable. Load your IFRAME that needs the results using the contents of your session variable. So, you can reload both the page and the IFRAME simultaniously while displaying your DB results in the IFRAME.
Copy linkTweet thisAlerts:
@DaiWelshJun 30.2004 — Put some js in the page returned into the first iframe (the one with the form that is submitting) to reload the second iframe. Exact syntax depends on names/relationship between iframes but something like

parent.iframe2.location.reload()

should do.

If you try to reload the two iframes when the form initially submits then you can not be sure that the update will have taken effect.

HTH,

Dai
Copy linkTweet thisAlerts:
@SidetomauthorJun 30.2004 — thanx alot
×

Success!

Help @Sidetom 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 5.19,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...