/    Sign up×
Community /Pin to ProfileBookmark

Transitioning Form Pages Without Page Refresh

At the following site: [url]http://www.lpappraisal.com/[/url] towards the bottom of the page there is a form that proceeds with a “next” button and carries over the values from the previous page without any page refreshes.

How can this be done?

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@mbreu996Apr 14.2011 — Easy. Store the values in an array and use innerHTML. Google 'javascript innerHTML' and you will find tons of stuff. You can exchange HTML content on the same webpage using innerHTML - so you aren't navigating to a new page just altering the HTML of the current page.

Your statement about "without refreshing"...

Actually refreshing is javascripts "enemy" because it whips out anything you have stored in an array (i.e. the data you typed in the form). If you don't believe me try refreshing that page - you'll see it warns you your info will be wiped out. In javascript, the concept of a global variable or session variable doesn't really apply - everything is page specific. That is where you need to switch to server side - i.e. PHP/AJAX/whatever else...
Copy linkTweet thisAlerts:
@beau_kangApr 14.2011 — Looks like they are doing it with $_POST variables in a php file after the form is submitted. This isn't a HTML thing, it's server side.

Least from what I can tell it is, anyone else want to confirm/deny that?
×

Success!

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

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

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