/    Sign up×
Community /Pin to ProfileBookmark

Javascript form pop-up

I am building a site for a client that requires integration with Google Local to produce directions to a preset postcode from a user defined postcode.

I have the backend working (using PHP), but my client wants the results to be shown in a new window. However as I am building this site to degrade gracefully if Javascript is disabled, I need a way of capturing the form POST request and opening (hijacking) it then passing it to a new window.

The obvious solution is to add a target=”_blank” attribute to the FORM tag, but that doesn’t validate in XHTML 1.0 Strict as target is now depriciated.

Throughout the rest of the site, I am using a system to catch pop-up windows from standard links and open them in new windows, but still work if Javascript is disabled (without the pop-up).

Is there a way of doing this with a form submit request script?

Kind regards,

Sam Clark
Polaris Digital

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @polarisdigital 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.2,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

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