/    Sign up×
Community /Pin to ProfileBookmark

submit without refresh

I need to send data to server without refreshing the page – one trick is to use a “target = ‘dummy'” in the href but that creates a blank page which I don’t want. Any clean way to do this? And I don’t want to use a frame set with a zero-width page either. :rolleyes:

Help? I know I’ve seen this in a tip somewhere… I just can’t find it now that I need it!

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@96turnerriDec 05.2003 — try href="#"
Copy linkTweet thisAlerts:
@AdamSeleneauthorDec 05.2003 — Well - I do actually have to send the data to a php scripted server page... I just don't want the server to send anything back! If I don't have the page output anythihg, it still changes the URL in the browser and shows a blank page. That's what I want to avoid - leave the old page up and just send the form back for processing. It can be a form or a href either one, just so I can send data back to a utility page that doesn't display.
×

Success!

Help @AdamSelene 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,
)...