Simple PHP/JS Question-Answer

using just basic JS no Jquery...

We have a form that posts to another website outside of out control (to capture email address).

when the user submits the form the data is checked with a js function to validate the data...



var from = [url removed, login to view];

if ([url removed, login to view] === 0) {

alert("Please Enter your Email Address.");

return false;


The form posts to an external site (so we have no control over it) something like

[url removed, login to view]

The problem is, the form is optional, and if it is filled out we want it to post the data

as entered to the external site as normal.

However, if there is no data (someone just clicks the submit button) we want the site

to redirect the user to a different page.

Tried, if (from.length===1){ [url removed, login to view] }

(for testing to see if a [url removed, login to view] would work)

That is not working.

Probably simple for someone knowledgeable.


Form submits to external site, if user enters nothing then redirect to a different


Taidot: Javascript, PHP

Näytä lisää: please enter your email, php.js, Question Answer, answer email, php http redirect, javascript url php, javascript submit form email address, page javascript simple, submit data php simple, capture location website, basic data capture form php, email button jquery, php post form data, website question answer, php post value, javascript enter data website form, jquery post form, jquery button email, jquery redirect page, testing question, http post redirect, php value post, simple website form email, http redirect post, php alert location

Tietoa työnantajasta:
( 5 arvostelua ) Geneseo, United States

Projektin tunnus: #4249372

Myönnetty käyttäjälle:


Hi, i can do it for you, right now !

30 $ USD 0 päivässä
(293 arvostelua)